Feature Card Carousel with Image Crossfade
An interactive feature carousel with an eyebrow and heading above a two-column card: a crossfading image on the left with overlaid arrow controls, and the active slide's title, description, and dot progress indicators on the right.
Docs
Installation
A real shadcn registry command, not a copy-paste stand-in: it fetches this block plus its media-slot dependencies and any missing npm packages, and installs them straight into your project.
npx shadcn add https://staaarter.com/r/feature-card-carousel-crossfade.jsonPrefer not to use the CLI? Copy the source from the Code toggle above into src/components/blocks/feature/feature103.tsx instead.
Usage
The file also exports feature103Demo, the exact props behind the preview above. Spread it to get a working section in one line, then replace it with your own data.
import { Feature103, feature103Demo } from "@/components/blocks/feature/feature103"; export default function Page() { return <Feature103 {...feature103Demo} />; }
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| eyebrow | string | undefined | Small label above the heading; omitted entirely when unset. |
| heading | ReactNode | none | Section heading. |
| slides | CarouselFeatureSlide[] | none | Carousel slides; the first is shown by default. |
| className | string | undefined | Extra classes for the outer section element. |
Types
type CarouselFeatureSlide = { title: string; description: string; image: { src: string; alt: string }; };
Behavior notes
- Real client-side state: an activeIndex useState drives which slide is shown; every slide's image is stacked absolutely and crossfades via a CSS opacity transition (opacity-0 to opacity-100 over 700ms) rather than mounting/unmounting images.
- Arrow buttons step the index by -1/+1 and wrap around at both ends (modulo arithmetic); dot buttons jump straight to a given slide.
- Dots use role="tablist"/role="tab"/aria-selected, and each carries an aria-label naming its slide for screen readers.
- "use client" component, so its demo props live in the sibling feature103.demo.tsx file per this repo's client/demo-file-split rule, not in feature103.tsx itself.
- No autoplay: the carousel only advances on explicit arrow or dot interaction.
More Feature Blocks
View all →Full-Bleed Workspace Band
Two-column header above a full-bleed image band with a live view switcher, closing on three numbered captions.
Center-Line Journey Timeline
Vertical hairline timeline alternating stages either side, dropping a phone frame on one step.
Figure-Led Evidence Rows
Tall image with a floating before-and-after card, leading into oversized-figure evidence rows.
Staircase Asset Trio
Three image tiles stepping down the page in a staircase, each floating a different live asset.
Sticky Reference List
Sticky heading column beside three labelled groups of checked capabilities, closing on a footnote.
Day Timeline Rows
Hairline rows walking through one working day, stamped with time and a live approval card inline.