eseperio / yii2-splide
Yii2 wrapper for Spidejs slider
Installs: 23
Dependents: 0
Suggesters: 0
Security: 0
Stars: 2
Watchers: 2
Forks: 0
Open Issues: 0
Type:yii2-extension
Requires
- npm-asset/splidejs--splide: 2.*
- npm-asset/splidejs--splide-extension-url-hash: ^0
- npm-asset/splidejs--splide-extension-video: ^0
- yiisoft/yii2: 2.*
README
A yii2 wrapper for SplideJs slider.
License
MIT license. See license
Content
- Assets
- Asset bundle with main styles (SplideCoreAsset)
- Asset bundle with main styles and default theme (SplideAsset)
- Widgets
- Splide: Widget to render a splide slider
- SplideThumbnailCarousel: Renders two sliders synced, one for main slider and other for thumbnails.
Installation:
Using composer:
composer require eseperio/yii2-splide
Usage
Widgets
There are two widgets. The former, a simple Splide slide, while the latter is a combination of two Splide slider for creating a carousel with thumbnail navigation (See thumbnail slider)
Video and grid not yet supported in current version of the wrapper.
echo Splide::widget([ 'items' => [ [ 'url' => 'http://someurl.com/image.jpg' ], [ 'url' => ['some/yii2urlformat', 'param1' => 'example'] ], [ 'type'=> Splide::TYPE_HTML, 'html'=> 'htmlcodegoeshere', ] ], ]);
Thumbnail slider
echo \eseperio\splide\widgets\SplideThumbnailCarousel::widget([ 'items' => $items ]);
Changelog
Options
All options of Splide can be defined through widget properties