OPUS/UI

Navigation

Carousel

Scroll-snap carousel — native swipe momentum, arrows, dots, keyboard, multi-slide widths and pausable autoplay.

2 files · 131 locdeps: clsx, tailwind-merge

Collection 1

Collection 4

Collection 7

Collection 10

Installation

With the shadcn CLI, pointing at this platform’s registry:

npx shadcn@latest add https://opusui.131199999.xyz/r/carousel.json

Or offline, straight from your opus55 checkout (copies every file it needs):

node ../tailwind_component/opus55/scripts/add.mjs carousel

Usage

import { Carousel } from "@/components/opus/ui/carousel";

<Carousel autoplay={4000}>{slides}</Carousel>

API

PropTypeDefaultDescription
slideWidthstring"100%"CSS width per slide.
gapnumber16Gap (px).
autoplaynumber0ms between slides (pauses on hover/focus).
loop / showDots / showArrowsbooleantrueBehaviour.

Command palette