# UGCarousel 轮播

> 适配器：React；状态：available；slug：`carousel`。

使用原生滚动吸附展示图片或内容，并提供可访问控制与受控索引。

## 适用场景

- 在有限区域内横向或纵向浏览一组图片、卡片或介绍内容。

## 不适用场景

- 静态同构内容优先使用 Grid/List；步骤流程使用 Steps；不要把关键正文只藏在自动轮播中。

## 公开入口

- 包入口：`@ug666/ui-react/components`
- 公开成员：`UGCarousel`、`UGCarouselItem`
- 交互文档：[https://ui.ug666.top/react/components/carousel](https://ui.ug666.top/react/components/carousel)

```tsx
import { UGCarousel, UGCarouselItem } from '@ug666/ui-react/components'
```

## 使用规则

- 索引从 0 开始；UGCarouselItem 必须放在 UGCarousel 内；默认不自动播放，避免干扰阅读和无障碍操作。
- 受控值使用当前组件声明的 value/onValueChange 或公开回调。
- 涉及 Hook、Portal 或浏览器状态时保留 client boundary。
- 只通过公开 Props、事件、插槽、class/className 和语义 Token 扩展。

## 相关候选

- [list](https://ui.ug666.top/ai/react/components/list.md)
- [card](https://ui.ug666.top/ai/react/components/card.md)
- [tabs](https://ui.ug666.top/ai/react/components/tabs.md)

## 生成前检查

- 当前适配器是否真实提供该组件。
- 导入路径、组件名和 API 是否存在于当前版本类型声明。
- 是否覆盖长文本、窄容器、键盘、焦点、disabled、loading 和错误状态。
