Skip to content

carousel

Contract: docs/contract/components/actions-carousel.md (§2) in the repository. Behaviour only: add data-wtk-carousel to the scope (an article or a gallery) and wtk.js makes every image in it, except images inside a link or button and those marked data-wtk-carousel-skip, open a modal <dialog> viewer. Give each image data-wtk-carousel-full="<url>", or the scope data-wtk-carousel-full="strip-query", for the full-resolution source; nothing full-sized loads until the viewer opens. Arrow keys, Home and End move; Escape, the close button or a click beside the image close and return focus to the image. Open an image in a fixture below to try it.

gallery · light
gallery · dark