diff --git a/README.md b/README.md index e2df089..0780e3d 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ ## Требования -- [Swiper](https://github.com/nolimits4web/swiper) версии ^10.2.0 +- [Swiper](https://github.com/nolimits4web/swiper) версии ^11.0.0 ## Подключение и настройка @@ -12,6 +12,7 @@
``` @@ -24,9 +25,9 @@ ### Минимальные настройки ```js -import gallery from '@advdominion/lightbox-gallery'; +import { gallery } from '@advdominion/lightbox-gallery'; -gallery(document.getElementById('list'), { +gallery(document.querySelector('#list'), { icons: { close: `/icons.svg#close`, }, @@ -36,9 +37,10 @@ gallery(document.getElementById('list'), { ### Все настройки ```js -import gallery from '@advdominion/lightbox-gallery'; +import { gallery } from '@advdominion/lightbox-gallery'; -gallery(document.getElementById('list'), { +gallery(document.querySelector('#list'), { + single: false, swiper: { speed: duration.effect.s, pagination: { @@ -71,3 +73,26 @@ gallery(document.getElementById('list'), { }, }); ``` + +### Одиночный элемент + +```js +import { gallery } from '@advdominion/lightbox-gallery'; + +gallery(document.querySelector('#list > a:first-child'), { + single: true, + animation: { + show: { + duration: 500, + easing: 'linear', + }, + hide: { + duration: 500, + easing: 'linear', + }, + }, + icons: { + close: `/icons.svg#close`, + }, +}); +```