Component libraryImage gallery
Image gallery
ProA controlled image gallery with native thumbnail and previous/next navigation plus an accessible modal preview.
npx shadcn@latest add @tidal-pro/image-galleryInstallation
Pro source is gated. Configure the @tidal-pro registry using the agent guide. Create an access key from your account after purchasing.
Terminal
Import components/ui/tidal.css, components/ui/image-gallery.css, then add the component inside a tidal-scope wrapper. Its scoped design tokens keep it independent of your existing CSS.
Usage
Complete example source · Dependency and asset manifest
Loading the complete example…
API & behavior
label, items, currentItemId and onCurrentItemChange are required. Each unique item supplies a string label, accessible consumer-owned media, optional thumbnail/caption/meta, disabled state, thumbnail attributes and ref. Native previous, next and roving thumbnail buttons run caller handlers first and honor prevention; Arrow/Home/End thumbnail movement follows direction and skips disabled items. Optional loop, disabled, localized labels and empty content remain consumer-owned. Inline and dialog previous/next controls have separate native attribute/ref paths so simultaneous buttons retain distinct identity and handlers. The official Radix Dialog preview supports controlled or uncontrolled open state, focus trapping, Escape, backdrop dismissal and trigger focus return, with explicit portal theme/direction/container and content/close refs. There is no autoplay, timer, image request, upload, download, route, analytics, network or storage behavior.
Style with the --t-* CSS variables. Set data-theme="dark" on your tidal-scope wrapper for a dark surface. Motion respects the system’s reduced-motion preference.