Skip to content

Carousel

Touch-friendly content rotator with autoplay, indicators, keyboard navigation, and reduced-motion support.

Data Display·Available inReactVueAngular·View as Markdown

Preview

tsx

Switch the framework picker (top-right of the panel) to render the same demo live in React, Vue, or Angular — same class names, ARIA, and visual output across all three.

Installation

Sisyphos UI ships unified packages for React, Vue, and Angular. Pick the one that matches your stack — every framework exports the same component classes, ARIA semantics, and CSS tokens.

$ pnpm add @sisyphos-ui/react

Then import the bundled stylesheet once at app entry: import "@sisyphos-ui/react/styles.css";

Usage

Idiomatic usage in each supported framework
import { Carousel } from "@sisyphos-ui/react";

export const Slides = () => (
  <Carousel autoplay>
    <Carousel.Slide><img src="/a.jpg" alt="" /></Carousel.Slide>
    <Carousel.Slide><img src="/b.jpg" alt="" /></Carousel.Slide>
    <Carousel.Slide><img src="/c.jpg" alt="" /></Carousel.Slide>
  </Carousel>
);

Auto-play

Enable `autoPlay` and tune the pace with `autoPlayInterval`. Pauses on hover/focus.

tsx

No loop

`loop={false}` stops wrapping — arrows disable at the edges.

tsx

Dots only

Hide arrow controls with `showArrows={false}` for pure dot-driven navigation.

tsx

Controlled index

Drive the carousel from outside UI with `index` + `onIndexChange`.

tsx
Slide 1 of 3

API

Props table is being written. See the package README for the complete API surface.

The full API including refs, ARIA attributes, and HTML passthroughs lives in the package README on npm.

Need more?View on npm →
Was this page helpful?