# j-Swiper

> j-Swiper: wrapper for [Swiper.js library](https://swiperjs.com/); easy usage

Framework: jcomponent20
Product: jComponent 20 (jcomponent@20)
Language: en
Content-SHA256: 4b36a89fe5de71f62485c2b96d511f38963c44008775b3901d630b5397d2c04a
Snapshot: c0700e321579725c5cf4f5ace1ad7d2866d1b4f93c24a63c0b41b6b7998e976c
Sources: components@910ed1a86f6e72b4f031d3ad0dc7844f9fc5cb8e
Review: not-recorded

- wrapper for [Swiper.js library](https://swiperjs.com/)
__Configuration__:

- `slidesperview {Number}` count of the items in the one slide (default: `1`)
- `spacebetween {Number}` a space between items (default: `0`)
- `navigation {Boolean}` show/hide navigation arrows (default: `false`)
- `pagination {Boolean}` show/hide pagination bullets (default: `false`)
- `autoplay {Boolean}` allow autoplay (default: `false`)
- `delay {Number}` a delay between slides change, working with autoplay only (default: `2500`)
- `loop {Boolean}` infinity loop through the slides (default: `false`)
- __NEW__ `reset {Number}` idle time after which the swiper restarts and returns to the first image (enter in minutes)
- __NEW__ `freemode {Boolean}` moving slides without fixed alignment to individual slides (default: `false`)

Use it with `<ui-component name="swiper">`. When the component is not loaded yet, jComponent downloads it on first use from the address in `DEF.fallback` (the Componentator CDN by default). Author: Dodo Marton. Source: the Componentator components repository, MIT license.

```html example.html
<div style="margin-bottom:30px">
	<ui-component name="swiper" path="datasource" config="slidesperview:3;spacebetween:30;pagination:1;navigation:1" class="hidden invisible">
		<script type="text/html">
			<div style="background-color:#E0E0E0;height:150px;color:#000">{{ name }}</div>
		</script>
	</ui-component>
</div>

<div>
	<ui-component name="swiper" config="slidesperview:3;autoplay:1" class="hidden invisible">
		<figure class="swiper-slide"><div style="background-color:#E0E0E0;height:150px;color:#000">A</div></figure>
		<figure class="swiper-slide"><div style="background-color:#E0E0E0;height:150px;color:#000">B</div></figure>
		<figure class="swiper-slide"><div style="background-color:#E0E0E0;height:150px;color:#000">C</div></figure>
		<figure class="swiper-slide"><div style="background-color:#E0E0E0;height:150px;color:#000">D</div></figure>
		<figure class="swiper-slide"><div style="background-color:#E0E0E0;height:150px;color:#000">E</div></figure>
		<figure class="swiper-slide"><div style="background-color:#E0E0E0;height:150px;color:#000">F</div></figure>
	</ui-component>
</div>
<script>
	var datasource = [{ name: 'A' }, { name: 'B' }, { name: 'C' }, { name: 'D' }, { name: 'E' }, { name: 'F' }, { name: 'G' }, { name: 'H' }, { name: 'I' }, { name: 'J' }]
</script>
```
