-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ff15b12
commit ff0d01e
Showing
1 changed file
with
51 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,56 @@ | ||
# Snap Carousel | ||
|
||
A very lightweight (4.7kB gzip) carousel library using the css [scroll-snap](https://developer.mozilla.org/en-US/docs/Web/CSS/scroll-snap-type) feature | ||
A very lightweight (4.7kB gzip) carousel library using the css [scroll-snap](https://developer.mozilla.org/en-US/docs/Web/CSS/scroll-snap-type) feature and the custom element shadow DOM to allow customization | ||
|
||
Check de [demo](https://corentin-gautier.github.io/snap-carousel/) | ||
Check de [demo](https://corentin-gautier.github.io/snap-carousel/) for examples | ||
|
||
## Features | ||
- Prev/Next buttons | ||
- Pagination | ||
- Pager (ie: "1 of 6") | ||
- loop (the css one, no cloning) | ||
- autoplay with stop on hover | ||
- Responsive configuration | ||
|
||
## Documentation | ||
coming soon ;) | ||
|
||
### How to use : Example | ||
```html | ||
<snap-carousel | ||
displayed="2" | ||
per-page="1" | ||
nav | ||
controls | ||
stop | ||
gap="16" | ||
padding="16" | ||
behavior="smooth" | ||
loop | ||
autoplay="3000" | ||
use-pause | ||
responsive="..." | ||
> | ||
</snap-carousel> | ||
``` | ||
|
||
### Options | ||
TODO | ||
| Attribute | Signification | | ||
| ------------- | ------------- | | ||
| vertical | ... | | ||
| displayed | ... | | ||
| per-page | ... | | ||
| nav | ... | | ||
| controls | ... | | ||
| pager | ... | | ||
| stop | ... | | ||
| gap | ... | | ||
| padding | ... | | ||
| behaviour | ... | | ||
| loop | ... | | ||
| autoplay | ... | | ||
| use-pause | ... | | ||
| responsive | ... | | ||
|
||
## Customize the controls | ||
TODO |