renschs / yii2-swiper
This package is abandoned and no longer maintained.
The author suggests using the itsolutionssg/yii2-swiper package instead.
Yii2 extension for Swiper slider; Php 8.2 ready;
3.1.0-
2025-04-28 12:32 UTC
Requires
- php: >=8.2
- bower-asset/swiper: >=11
- yiisoft/yii2: 2.*
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3.75
- phpstan/phpstan: ^2.1
- phpunit/phpunit: ^11.5
README
Yii2 widget for Swiper slider. See more here: https://github.com/nolimits4web/Swiper/.
You can find examples in demos folder.
Also you can read documentation.
Installation
You can get this extension through Composer.
Either run in terminal
$ php composer.phar require "itsolutionssg/yii2-swiper" "*"
or add
"itsolutionssg/yii2-swiper" : "*"
to the require section of your application's composer.json
file.
Usage
<?php /** * @var \yii\web\View $this */ use ItSolutionsSG\yii2\swiper\Swiper; echo Swiper::widget( [ 'items' => [ [ 'background' => 'http://lorempixel.com/600/600/nature/1' ], [ 'background' => 'http://lorempixel.com/600/600/nature/2' ], [ 'background' => 'http://lorempixel.com/600/600/nature/3' ], [ 'background' => 'http://lorempixel.com/600/600/nature/4' ], [ 'background' => 'http://lorempixel.com/600/600/nature/5' ] ], 'behaviours' => [ 'pagination' ], 'pluginOptions' => [ 'grabCursor' => true, 'centeredSlides' => true, 'slidesPerView' => 'auto', 'effect' => 'coverflow', 'coverflow' => [ 'rotate' => 50, 'stretch' => 0, 'depth' => 100, 'modifier' => 1, 'slideShadows' => true ] ] ] );
Tests
You can execute unit tests from root dir with command:
composer run-script unit-test
Thanks
To https://github.com/romka-chev for given me the opportunity to fork his project and get it working again.
Issues
If some problems occurred, you can create issue.
Thank you for attention.