Atelier UI

搜索组件…

搜索组件…

Carousel

无障碍轮播,支持拖拽滑动、键盘、圆点与自动播放。

在沙盒中编辑

复制一段给 AI 编程工具的提示词,包含源码、依赖和用法

属性

CarouselProps

同时支持以下类型的全部属性: Omit<React.ComponentProps<"section">, "children">

属性类型默认值说明
slides* 必填CarouselSlide[]——
loopbooleanfalseWrap from the last slide to the first (and back)
autoplaybooleanfalse—
intervalnumber4500Autoplay delay in ms
showDotsbooleantrue—
showArrowsbooleantrue—
labelstring"Carousel"Accessible name of the carousel

安装

$ npx shadcn@latest add https://chromotion.dev/r/carousel.json

同类组件