Skip to content

Hero slideshow

Built on Carousel, so slides scroll natively with snap points and the controls sit over the bottom of the images. Each slide sets its own alignment and surface. The first slide’s title is the page h1.

  • slides: list of { image, imageAlt, eyebrow, title, text, cta, align, surface }
    • cta: { label, href }, rendered as a Button
    • align: start (default), center, end
    • surface: dark (default, white text on a dark scrim), brand, light, alternate (dark text on a light scrim)
  • height: auto, tall (default), screen (data-height, as Hero)
  • autoplay: advances on a timer, with a pause button; pauses on hover and focus and stays off under reduced motion
  • interval: autoplay delay in milliseconds (default 6000)
  • label: accessible name of the carousel (default “Featured”)
<HeroSlideshow
slides={[
{
image: "/images/demo-site.jpg",
eyebrow: "Samla",
title: "A design system built for speed",
text: "Accessible, static-first components for Astro.",
cta: { label: "Get started", href: "/getting-started/" },
},
{ image: "/images/statement.jpg", title: "Statement", align: "center" },
]}
/>
height="auto", autoplay