DDBS UI
heroes

Crossfade Hero Slider

A full-width hero slider: crossfade, a slow Ken Burns zoom, a word by word heading with kicker, copy and link, arrows, progress indicators and a pause button.

npx shadcn@latest add https://ui.develop-better-solutions.com/r/crossfade-hero-slider.json
Dependencies:lucide-react
Fullscreen
A meadow at dawn

New season

LightMeadow

Soft, open pieces for slow mornings.

Shop now
A calm wave

Coastal edit

CalmWater

Cool tones and quiet textures.

Shop now
A painted landscape

Studio

PaintedHorizons

Made slowly, in small runs.

Shop now

Usage

crossfade-hero-slider-example.tsx
import { CrossfadeHeroSlider } from "@dbs/ui";

export default function CrossfadeHeroSliderExample() {
  return (
    <CrossfadeHeroSlider
      label="Featured collections"
      heightClassName="h-[420px] lg:h-[480px]"
      slides={[
        { id: "1", image: "/samples/halden-hero-1.jpg", alt: "A meadow at dawn", kicker: "New season", title: ["Light", "Meadow"], copy: "Soft, open pieces for slow mornings.", href: "#", ctaLabel: "Shop now" },
        { id: "2", image: "/samples/halden-hero-2.jpg", alt: "A calm wave", kicker: "Coastal edit", title: ["Calm", "Water"], copy: "Cool tones and quiet textures.", href: "#", ctaLabel: "Shop now" },
        { id: "3", image: "/samples/halden-hero-3.jpg", alt: "A painted landscape", kicker: "Studio", title: ["Painted", "Horizons"], copy: "Made slowly, in small runs.", href: "#", ctaLabel: "Shop now" },
      ]}
    />
  );
}