More components in Pro
Galleries, cards and interactive pieces for pages that need more than the basics.
items | Array<{ image: string; label?: string; link?: string; alt?: string }> | 5 sample panels | The panels to render. Each needs an image, and optionally a label, link and alt text. |
defaultIndex | 2 | Index of the panel that is expanded on load, so the gallery never looks dead. | |
accentColor | "#ffffff" | Colour of the caption accent bar and the focus ring. | |
overlayColor | "#060010" | Colour used for the bottom legibility gradient and the dimming of collapsed panels. | |
textColor | "#ffffff" | Colour of the caption text. | |
grayscale | Desaturate collapsed panels and restore full colour on the expanded one. | ||
showLabels | Whether captions reveal on the expanded panel. | ||
duration | 0.6 | Duration of the expand / collapse transition in seconds. | |
ease | "power3.out" | GSAP easing used for every transition. | |
parallax | 0.5 | Strength of the internal image drift as panels resize (0 disables it). | |
tilt | 8 | Degrees of 3D rotation applied to collapsed panels, easing to flat on the open one. | |
stagger | 0.06 | Delay between the caption bar and text reveal, in seconds. | |
trigger | "hover" | "click" | "hover" | How a panel expands on pointer devices. Focus and tap always expand too. |
height | 460 | Height of the row in pixels (width of the column when vertical). | |
gap | 10 | Gap between panels in pixels. | |
radius | 16 | Corner radius of each panel in pixels. | |
expandRatio | 0.52 | Fraction of the row the expanded panel occupies (0.2 – 0.9). | |
orientation | "horizontal" | "vertical" | "horizontal" | Lay the accordion out as a row or a column. |
itemsArray<{ image: string; label?: string; link?: string; alt?: string }>The panels to render. Each needs an image, and optionally a label, link and alt text.
5 sample panelsdefaultIndexnumberIndex of the panel that is expanded on load, so the gallery never looks dead.
2accentColorstringColour of the caption accent bar and the focus ring.
"#ffffff"overlayColorstringColour used for the bottom legibility gradient and the dimming of collapsed panels.
"#060010"textColorstringColour of the caption text.
"#ffffff"grayscalebooleanDesaturate collapsed panels and restore full colour on the expanded one.
showLabelsbooleanWhether captions reveal on the expanded panel.
durationnumberDuration of the expand / collapse transition in seconds.
0.6easestringGSAP easing used for every transition.
"power3.out"parallaxnumberStrength of the internal image drift as panels resize (0 disables it).
0.5tiltnumberDegrees of 3D rotation applied to collapsed panels, easing to flat on the open one.
8staggernumberDelay between the caption bar and text reveal, in seconds.
0.06trigger"hover" | "click"How a panel expands on pointer devices. Focus and tap always expand too.
"hover"heightnumberHeight of the row in pixels (width of the column when vertical).
460gapnumberGap between panels in pixels.
10radiusnumberCorner radius of each panel in pixels.
16expandRationumberFraction of the row the expanded panel occupies (0.2 – 0.9).
0.52orientation"horizontal" | "vertical"Lay the accordion out as a row or a column.
"horizontal"Dependencies
1 required package
npm install gsap


