Skip to content

Commit

Permalink
Updated readme.
Browse files Browse the repository at this point in the history
  • Loading branch information
hperrin committed Apr 24, 2019
1 parent fa6a9fe commit 86b00cb
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,16 @@ Check it out: https://sciactive.github.io/multicarousel/demo/

## Use

Using it requires you to pass in an array of children DOM elements. Like this:
Use the IIFE file in the `dist` directory or the ES module in the `lib` directory.

When you instantiate, pass an array of DOM elements as the items prop. Like this:

```js
var container = document.getElementById('MyCarousel');
var carousel = new MultiCarousel({
const container = document.getElementById('MyCarousel');
const carousel = new MultiCarousel({
target: container,
data: {
items: Array.prototype.slice.call(container.children),
props: {
items: [...container.children],
// The rest of these are optional. Here are the defaults.
delay: 1500, // Delay between slides.
transition: 600, // Duration of slide transition.
Expand All @@ -49,7 +51,7 @@ carousel.start();

## Made with Svelte

It's made with [Svelte](https://svelte.technology/), which means you don't need any library JS. Just use the file in the lib directory.
It's made with [Svelte](https://svelte.dev/).

## Icon Credits

Expand Down

0 comments on commit 86b00cb

Please sign in to comment.