Services Showcase
A layered image stack that unfolds into three portrait cards on hover, tap, or keyboard activation, with a subtle pointer perspective response.
Installation#
pnpm dlx shadcn@latest add @davinciui/services-showcaseUsage#
API Reference#
| Prop | Type | Default |
|---|---|---|
imagesThe image layers in front-to-back order. Each image needs src and alt. | ServiceImage[] | — |
densityCompact uses the same centered stack at gallery-card size. Layout otherwise follows the container width automatically. | "comfortable" | "compact" | "comfortable" |
interactiveEnables hover, tap, and keyboard unfolding. Fine pointers also add a subtle perspective response; reduced-motion preferences remove the transition. | boolean | true |
autoPlayRuns the compact-to-open loop automatically. Useful for display-only previews. | boolean | false |
Accessibility#
When interactive, the stack is a button labelled Service image stack with aria-expanded; click or keyboard activation toggles it and Escape closes it, plus a focus-visible outline. Pointer hover opens it, but focus alone does not. When interactive is false it is a plain div.
Motion#
Cards unfold with 680ms cubic-bezier transforms and staggered delays, fine-pointer movement adds a damped perspective tilt, and autoPlay runs a 5.8s CSS loop. A reduced-motion media query removes transitions and animations, and the tilt script also checks the preference.
View source
Keep in mind
Need a custom component?
I build bespoke UI components & websites tailored to your brand.

