BoseUI v2

Story Cards

Cards

Interactive looped story card showcase featuring continuous virtual looping, spring-animated expanding active slides, mouse-wheel scrub, touch gestures, and keyboard navigation.

What's happening

Discover the latest stories.

Technology infrastructure
Modern office interior

Annual letter 2025

We survived another year of meetings, deadlines, bugs, and pretending everything was part of the plan.

Team collaborating in an office
Person exploring a landscape
Technology infrastructure
Modern office interior

We survived another year of meetings, deadlines, bugs, and pretending everything was part of the plan.

Installation

Install directly into your project using the shadcn CLI or copy the source code manually.

Requires:framer-motionclsxtailwind-merge
$npx shadcn@latest add "https://boseui.site/r/story-cards.json"

Props

TypeScript props supported by <StoryCards />.

9 props
PropTypeDefaultDescription
cardsStoryCard[]—Array of story items with id, title, description, image, and optional ctaLabel/href.
initialIndexnumber0Starting active card index.
autoPlaybooleanfalseAutomatically cycle through stories on an interval.
autoPlayIntervalnumber5000Autoplay advance interval in milliseconds.
showNavigationbooleantrueRender previous and next icon buttons in the header.
loopbooleantrueWhen true, cycling wraps seamlessly around the beginning and end.
enableWheelScrollbooleantrueAllow trackpad or mouse-wheel gestures to step through cards.
titlestringWhat's happeningSection headline text.
subtitlestringDiscover the latest stories.Section descriptive subtitle text.

Key Features

  • Virtual circular index math allowing continuous, endless forward and backward looping.
  • Spring-physics flex width interpolation allocating expanded focus to the active story.
  • Multi-input gesture support: arrow keys, mouse wheel/trackpad horizontal scrub, and touch swipes.
  • Accessible semantic landmarks with aria-live announcements and full keyboard controls.

Keyboard & Accessibility

  • Uses semantic <section> with aria-label='Stories' and aria-live announcements.
  • Provides Left/Right arrow key navigation while ignoring inputs and editable fields.
  • Respects prefers-reduced-motion to instantly switch slides without spring oscillations.