More components in Pro
Galleries, cards and interactive pieces for pages that need more than the basics.
items | Array<{ image: string; text?: string; description?: string; alt?: string }> | 12 sample photos | Images to show. `text` is the title under each card, `description` appears under the title when a card is open and `alt` names the image for screen readers. |
bend | 3 | Curvature of the arc. Positive values arch the cards down at the edges, negative values lift them, 0 lays them flat. | |
itemSize | Card height relative to the container, from 0.2 to 2. | ||
itemAspect | 0.78 | Card width divided by height. Images are cropped to fill the card. | |
gap | 0.26 | Space between cards as a fraction of the card width. | |
borderRadius | 0.05 | Corner radius as a fraction of the card size, from 0 (square) to 0.5 (fully round). | |
wave | How much the cards ripple while the gallery moves. 0 keeps them flat. | ||
fadeEdges | 0.12 | Fades the cards out toward the left and right edges, from 0 to 0.5 of the width. | |
shadow | 0.25 | Strength of the soft shadow under each card. | |
textColor | '#ffffff' | Color of the titles, the keyboard focus ring and the placeholder shown while images load. | |
font | 'bold 30px Figtree' | CSS font shorthand for the titles. The size scales with the cards, so 30px means the default size and larger values make the titles bigger. | |
fontUrl | undefined | Font to load for the titles. Accepts a stylesheet URL (e.g. a Google Fonts link) or a font file (.woff2, .woff, .ttf, .otf). The loaded family replaces the family in `font`. | |
showTitles | Shows the title of each card underneath it. | ||
scrollSpeed | 2 | How far the gallery travels per drag or wheel movement. | |
scrollEase | 0.05 | How quickly the gallery catches up with the input, from 0.001 (floaty) to 1 (instant). | |
snap | Settles on the nearest card after dragging or scrolling. | ||
autoScroll | Speed of an automatic drift, where 1 moves about one card every four seconds and negative values drift the other way. It pauses on hover, while dragging, while a card is open and briefly after any input. | ||
grayscale | Shows the images in grayscale and brings the color back on hover, focus or when opened. | ||
openOnClick | Clicking a card opens it to its full image. Click it again, click outside it, press Escape or use the close button to return. When off, clicking a card centers it. | ||
| Glides the cards in when the gallery mounts. | |||
onItemClick | (item, index) => void | Called when a card is clicked. | |
onActiveChange | (index) => void | Called when a different card becomes the centered one. | |
dpr | auto | Maximum device pixel ratio, capped at 2. | |
| Extra class names for the container. | |||
| Inline styles for the container. |
itemsArray<{ image: string; text?: string; description?: string; alt?: string }>Images to show. `text` is the title under each card, `description` appears under the title when a card is open and `alt` names the image for screen readers.
12 sample photosbendnumberCurvature of the arc. Positive values arch the cards down at the edges, negative values lift them, 0 lays them flat.
3itemSizenumberCard height relative to the container, from 0.2 to 2.
itemAspectnumberCard width divided by height. Images are cropped to fill the card.
0.78gapnumberSpace between cards as a fraction of the card width.
0.26borderRadiusnumberCorner radius as a fraction of the card size, from 0 (square) to 0.5 (fully round).
0.05wavenumberHow much the cards ripple while the gallery moves. 0 keeps them flat.
fadeEdgesnumberFades the cards out toward the left and right edges, from 0 to 0.5 of the width.
0.12shadownumberStrength of the soft shadow under each card.
0.25textColorstringColor of the titles, the keyboard focus ring and the placeholder shown while images load.
'#ffffff'fontstringCSS font shorthand for the titles. The size scales with the cards, so 30px means the default size and larger values make the titles bigger.
'bold 30px Figtree'fontUrlstringFont to load for the titles. Accepts a stylesheet URL (e.g. a Google Fonts link) or a font file (.woff2, .woff, .ttf, .otf). The loaded family replaces the family in `font`.
undefinedshowTitlesbooleanShows the title of each card underneath it.
scrollSpeednumberHow far the gallery travels per drag or wheel movement.
2scrollEasenumberHow quickly the gallery catches up with the input, from 0.001 (floaty) to 1 (instant).
0.05snapbooleanSettles on the nearest card after dragging or scrolling.
autoScrollnumberSpeed of an automatic drift, where 1 moves about one card every four seconds and negative values drift the other way. It pauses on hover, while dragging, while a card is open and briefly after any input.
grayscalebooleanShows the images in grayscale and brings the color back on hover, focus or when opened.
openOnClickbooleanClicking a card opens it to its full image. Click it again, click outside it, press Escape or use the close button to return. When off, clicking a card centers it.
introbooleanGlides the cards in when the gallery mounts.
onItemClick(item, index) => voidCalled when a card is clicked.
onActiveChange(index) => voidCalled when a different card becomes the centered one.
dprnumberMaximum device pixel ratio, capped at 2.
autoExtra class names for the container.
Inline styles for the container.



