Carousel
Gallery With Lightbox
A strip of thumbnails where a click opens the shot large above the page: arrows, a "3 of 12" counter, and the focus trap and Escape inherited from the native dialog.
What you can change
- the gallery heading through label and the set of frames through shots
- the counter template counter with the {n} and {total} placeholders
- the proportions of the large frame through ratio: 4:3, 16:9 or 1:1
A link for your AI agent: preview, code and instructions.
Preview
Use it with AI
- 1. Copy the link.
- 2. Write to your agent in your own words and drop the link into the sentence.
- 3. The agent opens the link and installs the component from the registry.
put this on the home page as the hero:
https://vibeui.ru/c/carousel-017?lang=en&theme=dark
Not sure where to paste it? Step-by-step guide
Show the full instructions
What the link says, spelled out. Use it when your agent cannot open links — paste this text instead.
Loading…
For developers
The install command lives in the “Component source” block below — a signed link that stays valid for 24 hours.
Technical notes
A client component: the index of the open shot lives in useState and the window is a native <dialog> opened through showModal(). One file, no dependencies, the palette in the local --vibeui-carousel-017-* variables. The shots are not images: every one is described by a hue in degrees and painted with a gradient through the --vibeui-carousel-017-hue variable, so the item carries neither pictures nor network requests. The modal mode gives the focus trap, Escape and the dimmed backdrop for free; the html:has(dialog[open]:modal){overflow:hidden} rule adds what the browser does not do — locking the page scroll. The arrows inside the window cycle through the shots, ArrowLeft and ArrowRight do the same from the keyboard, and the counter is assembled from the counter template. The defaultOpen prop opens the window non-modally through show(): it stays inside the block and lands in the showcase frame.
Tags
- gallery
- lightbox
- dialog
- carousel
- client
Component source
The same file your agent installs. Here in case you would rather copy it by hand.
Loading…