For AI agents: the complete documentation index is available at https://rickyshin93.github.io/tao-ui/zh/llms.txt, the full documentation bundle is available at https://rickyshin93.github.io/tao-ui/zh/llms-full.txt, and this page is available as Markdown at https://rickyshin93.github.io/tao-ui/zh/components/segmented.md.
v0.0.57
  • 简体中文
  • Segmented

    数据录入@rockshin/tao-ui

    从紧凑选项中选择单个视图或模式。

    组件采用 tao-ui 原生实现,公共 API 对齐 Ant Design 6.7.0。外观、主题 token 与 Semantic DOM 定制遵循 tao-ui,主题通过 TaoProvider 配置。

    6.7.0 value/options API 使用原生单选控件与 tao-ui 动效实现;尺寸继承 TaoProvider,减弱动态效果时关闭移动高亮。

    何时使用

    适合少量紧密相关的选项,原生单选控件支持表单提交与键盘选择。

    代码演示

    基础选择

    TSX

    受控选择

    Current view: List

    TSX

    尺寸与圆形风格

    TSX

    禁用选项与自定义标签

    390 × 640
    TSX

    垂直排列与 RTL

    TSX

    提交原生表单

    Submitted: —

    TSX

    API

    Segmented

    属性说明类型默认值
    disabled是否禁用boolean | undefined-