Modus UI

Curved Carousel Hero

Web (React)

A landing hero with a curved, draggable carousel of video cards that drifts like the inside of a cylinder.

A one-screen hero for showing work in motion: a badge, a two-line headline and a lede above an arched row of tall cards. The cards drift right to left on their own; drag or fling them, or press the arrow keys, and they coast to a stop before the drift carries on. Cards near the edges grow taller and lean outward, recomputed every frame as rounded quads. Handwritten notes and arrows draw themselves in. Colours come from theme tokens, so it follows light and dark mode and the palette picker. Below 820px it stacks into a centred column with a shorter carousel. With reduced motion there is no entrance, no drift and no video.

New · Curved carousel

Every story,in motion

Line your work up on a curved row that drifts on its own and answers to a drag. Drop in clips or images and it does the rest.

Drag the row

It's free

Modus / Curved Carousel Hero

Installation

CLI

npx @modus-ui/cli add curved-carousel-hero

Manual

  1. Copy the code from the component tab.
  2. Create a file at components/ui/curved-carousel-hero.tsx.
  3. Paste the code.

Usage

tsx
import { CurvedCarouselHero } from "@/components/ui/curved-carousel-hero";

export default function Example() {
  return (
    <div className="relative h-screen w-full">
      <CurvedCarouselHero
        cards={[
          { video: "/clips/sneaker.mp4", image: "/clips/sneaker.jpg" },
          { image: "/clips/latte.jpg" },
        ]}
      />
    </div>
  );
}

Props

PropTypeDefaultDescription
badgestring"New · Curved carousel"Pill above the headline.
titlestring"Every story,\nin motion"Headline; a newline starts the second line.
descriptionstring"Line your work up on a curved row that drifts on its own and answers to a drag. Drop in clips or images and it does the rest."Lede under the headline.
ctaLabelstring"Get started"Button label.
ctaHrefstring"#"Button link.
notestring"Drag\nthe row"Handwritten note by the carousel; a newline breaks it.
ctaNotestring"It's free"Handwritten note by the button.
cardsCurvedCarouselCard[][]{ video?, image? } per card, repeated to fill at least ten.
speednumber50Drift speed in frame units (1/1440 of the width) per second.
backgroundColorstringNoneSection background; defaults to the theme background.
classNamestringNoneExtra classes for the section.
styleCSSPropertiesNoneInline styles for the section.

Comments

  • No comments yet.