Expandable Showcase
Web (React)
A horizontal or vertical list of items where hovering or clicking expands one item while shrinking others.
A horizontal or vertical list of items where hovering or clicking expands one item while shrinking others. Perfect for image galleries, product showcases, or interactive feature lists.
Horizontal Gallery
Canyon
Mountain Peak
Waterfall
Lush Forest
Alpine Lake
Vertical Gallery
Canyon
Mountain Peak
Waterfall
Lush Forest
Alpine Lake
Installation
CLI
npx @modus-ui/cli add expandable-showcaseManual
- Copy the code from the component tab.
- Create a file at
components/ui/expandable-showcase.tsx. - Paste the code.
Usage
tsx
Props
| Prop | Type | Default | Description |
|---|---|---|---|
items | ShowcaseItem[] | - | Array of objects containing id, image, and label. |
defaultIndex | number | 0 | The index of the initially expanded item. |
orientation | "horizontal" | "vertical" | "horizontal" | Direction of the gallery. |
height | number | string | 460 | Height of the container. |
gap | number | 12 | Spacing between items. |
Comments