Swipe component with touch support, for image carousels or any other content. Try it out the demo in your browser or on your device.
$ component install component/swipe
Create a swipe object for
el. This should be a container element
that wraps a list of several items. View ./example.html for a
Set the transition duration, defaults to 300ms.
Set the cycle interval, defaults to 5000ms.
This method should be invoked when the swipe element has been resized, or an item has been added or removed.
Play through all items using the cycle interval.
Is on the first item.
Is on the last item.
Show the previous item if present, or do nothing.
Show the next item if present, or do nothing.
Show item with the given index
i with the given
ms defaulting to the
Emit `show` event.