Skip to content

Markup & attributes ​

Elements ​

ElementDescription
<insigne-slider>The slider. Every option is an attribute in kebab-case (slides-per-view). data--prefixed names work too.
<insigne-slide>Optional slide element with background shorthands (below). Any element can be a slide.
[data-insigne]Turns any div, section, article, header, main, aside, nav, footer into a slider. Options as data-*. data-insigne='{…}' may hold JSON.
<script type="application/json">Direct child of a slider: options as JSON.

<insigne-slide> attributes ​

AttributeTypeDescription
bgURLBackground image (creates <img data-bg>).
altstringAlt text of the background.
focus"x% y%"Focal point.
safe"l t w h"Safe area in % of the image.
fitsmart | cover | containFit mode.
lazybooleanLoad the image near the active slide only.

Slide-level attributes ​

AttributeOnTypeDescription
data-bgimg, picture, video (direct child of a slide)flagMarks the background.
data-focusbackground or slide"x% y%" or keywordsFocal point (default from the focus option).
data-safebackground or slide"l t w h"Safe area.
data-fitbackground or slidesmart | cover | containFit mode.
data-src, data-srcsetimg, source, videoURL / srcsetLazy sources.
data-ken-burnsslidestyle or falseKen Burns for this slide.
data-ins-ignoredirect childflagNot a slide.
slotdirect childanyNot a slide (reserved for future named slots).

Layer attributes ​

AttributeTypeDescription
data-inrecipe nameEntrance when the slide becomes active. Empty = layerIn option (or rise).
data-outreverse | none | fade | up | down | left | blurExit when the slide leaves. Default: layerOut option (reverse).
data-delaymsStart time. Default: 110 ms after the previous layer.
data-splitlines | words | chars | noneHow to split the text.
data-parallaxpx or %Horizontal offset while the slide travels (-30%, 120).
data-parallax-opacity0–1Opacity when the slide is one step away.
data-parallax-scalenumberScale when the slide is one step away.

State the slider adds ​

OnAttribute / classMeaning
slider elementdata-ins-readyStarted.
slider elementdata-ins-motion="pending" | "on"Layer engine loading / active.
slider elementdata-ins-fillheight: "fill".
slider elementdata-ins-depthScroll depth active.
slide.ins-slide, .is-active, .is-prev, .is-next, .has-bgState classes.
sliderole="group", aria-roledescription, aria-label, inertAccessibility.
background.ins-bg + inline positionSmart fit placement.

destroy() removes all of these.

Insigne Slider v1.0.0 · Free for any use with visible attribution · Atıf ile her kullanım için ücretsiz