bjornarhagen / vue-snap

Lightweight Carousel based on CSS Scroll Snapping

Home Page:https://bartdominiak.github.io/vue-snap/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

npm version Build Status npm bundle size license

vue-snap logo

vue-snap

Lightweight Slider/Carousel based on CSS Scroll Snap.

About

Please note that this lib is on very early stage. The idea behind this plugin is that to create fully responsive and well optimised Carousel. I created this as PoC for one of my biggest client, who wants to speed up his website.

Storybook & Docs

Benefits:

  • Lightweight (5-10x times lighter than other libs)
  • There is no calculation or heavy logic inside (Performence)
  • Mostly all custamization via CSS!
  • You can set how many slides you want to display per current breakpoint (via css)
  • Fully responsive

Usage

There are two ways to use it.

Globally

import Vue from 'vue'
import VueSnap from 'vue-snap'
import 'vue-snap/dist/vue-snap.css'

Vue.use(VueSnap)

Locally

import { Carousel, Slide } from 'vue-snap'
import 'vue-snap/dist/vue-snap.css'

export default {
  components: {
    Carousel,
    Slide
  }
}

Development

Install necessary depandancies with yarn or npm

  yarn

Run in Development mode

  yarn dev

Run in Production mode

  yarn build

Run Storybook for preview

  yarn storybook:dev

Contribution

Feel free to grab an issue from the list, just remember to squash your commits before merge.

About

Lightweight Carousel based on CSS Scroll Snapping

https://bartdominiak.github.io/vue-snap/

License:MIT License


Languages

Language:JavaScript 63.4%Language:Vue 27.5%Language:CSS 7.9%Language:Shell 1.2%