Image gallery preview
A controlled image gallery with native thumbnail and previous/next navigation plus an accessible modal preview.
pro · Essentials · composite
When to use
- Use it when a page needs a controlled image gallery with native thumbnail and previous/next navigation plus an accessible modal preview.
- Choose it when the host application can supply the required state and keep business logic outside the presentation component.
Alternatives
- Choose tidal-button instead when press, loading, success and disabled states is the actual interface need, rather than image gallery.
Configure components.json and the @tidal-pro namespace before installing Pro components.
Installation
npx shadcn@latest add @tidal-pro/image-galleryImport components/ui/tidal.css, components/ui/image-gallery.css. Wrap installed components in tidal-scope.
Preview

Minimal example
import"./components/ui/tidal.css";
import"./components/ui/image-gallery.css";
import{TidalImageGallery}from"./components/ui/image-gallery";
export default()=><div className="tidal-scope"><TidalImageGallery currentItemId={"example"} items={[{id:"example",label:"Demo",media:"value"}]} label={"Demo"} onCurrentItemChange={() => {}}/></div>;API and props
TidalImageGallery.currentItemId (required)stringRequired current item id value accepted by this exported component.
TidalImageGallery.items (required)ReadonlyArray<TidalImageGalleryItem>Required items value accepted by this exported component.
TidalImageGallery.label (required)stringRequired label value accepted by this exported component.
TidalImageGallery.onCurrentItemChange (required)(itemId: string, event: TidalImageGalleryChangeEvent, source: TidalImageGalleryChangeSource) => voidCallback invoked when the current item change interaction is proposed.
TidalImageGallery.closeButtonPropsOmit<ButtonHTMLAttributes<HTMLButtonElement>, "disabled" | "type" | "aria-disabled" | "aria-label" | "children"> | undefinedOptional close button props value accepted by this exported component.
TidalImageGallery.closeButtonRefRef<HTMLButtonElement> | undefinedOptional close button ref value accepted by this exported component.
TidalImageGallery.defaultOpenboolean | undefinedOptional default open value accepted by this exported component.
TidalImageGallery.dialogContentPropsOmit<Omit<Dialog.DialogContentProps & RefAttributes<HTMLDivElement>, "ref">, "children" | "asChild"> | undefinedOptional dialog content props value accepted by this exported component.
TidalImageGallery.dialogContentRefRef<HTMLDivElement> | undefinedOptional dialog content ref value accepted by this exported component.
TidalImageGallery.dialogNextButtonPropsOmit<ButtonHTMLAttributes<HTMLButtonElement>, "disabled" | "type" | "aria-disabled" | "aria-label" | "children"> | undefinedOptional dialog next button props value accepted by this exported component.
TidalImageGallery.dialogNextButtonRefRef<HTMLButtonElement> | undefinedOptional dialog next button ref value accepted by this exported component.
TidalImageGallery.dialogPreviousButtonPropsOmit<ButtonHTMLAttributes<HTMLButtonElement>, "disabled" | "type" | "aria-disabled" | "aria-label" | "children"> | undefinedOptional dialog previous button props value accepted by this exported component.
TidalImageGallery.dialogPreviousButtonRefRef<HTMLButtonElement> | undefinedOptional dialog previous button ref value accepted by this exported component.
TidalImageGallery.dir"ltr" | "rtl" | undefinedOptional dir value accepted by this exported component.
TidalImageGallery.disabledboolean | undefinedOptional disabled value accepted by this exported component.
TidalImageGallery.emptyMessageReactNodeOptional empty message value accepted by this exported component.
TidalImageGallery.labelsPartial<TidalImageGalleryLabels> | undefinedOptional labels value accepted by this exported component.
TidalImageGallery.loopboolean | undefinedOptional loop value accepted by this exported component.
TidalImageGallery.nextButtonPropsOmit<ButtonHTMLAttributes<HTMLButtonElement>, "disabled" | "type" | "aria-disabled" | "aria-label" | "children"> | undefinedOptional next button props value accepted by this exported component.
TidalImageGallery.nextButtonRefRef<HTMLButtonElement> | undefinedOptional next button ref value accepted by this exported component.
TidalImageGallery.onOpenChange((open: boolean) => void) | undefinedCallback invoked when the open change interaction is proposed.
TidalImageGallery.openboolean | undefinedOptional open value accepted by this exported component.
TidalImageGallery.openButtonPropsOmit<ButtonHTMLAttributes<HTMLButtonElement>, "disabled" | "type" | "aria-disabled" | "aria-label" | "children"> | undefinedOptional open button props value accepted by this exported component.
TidalImageGallery.openButtonRefRef<HTMLButtonElement> | undefinedOptional open button ref value accepted by this exported component.
TidalImageGallery.portalContainerHTMLElement | null | undefinedOptional portal container value accepted by this exported component.
TidalImageGallery.previousButtonPropsOmit<ButtonHTMLAttributes<HTMLButtonElement>, "disabled" | "type" | "aria-disabled" | "aria-label" | "children"> | undefinedOptional previous button props value accepted by this exported component.
TidalImageGallery.previousButtonRefRef<HTMLButtonElement> | undefinedOptional previous button ref value accepted by this exported component.
TidalImageGallery.theme"light" | "dark" | undefinedOptional theme value accepted by this exported component.
Complete usage
Full example, stylesheet imports, API and accessibility documentation
Gotchas
- The host application owns data, validation, persistence, navigation, and service side effects described by this API.