复制一段给 AI 编程工具的提示词,包含源码、依赖和用法
属性
CarouselProps
同时支持以下类型的全部属性: Omit<React.ComponentProps<"section">, "children">
| 属性 | 类型 | 默认值 | 说明 |
|---|---|---|---|
| slides* 必填 | CarouselSlide[] | — | — |
| loop | boolean | false | Wrap from the last slide to the first (and back) |
| autoplay | boolean | false | — |
| interval | number | 4500 | Autoplay delay in ms |
| showDots | boolean | true | — |
| showArrows | boolean | true | — |
| label | string | "Carousel" | Accessible name of the carousel |
安装
$ npx shadcn@latest add https://chromotion.dev/r/carousel.json