Oddmash UI
所有组件

Switch

开启或关闭设置。

用法

用于立即生效的设置。要使用 Fold 滑块和按压反馈,请在开关或其祖先元素上设置 data-om-motion="fold"。

无障碍

状态变化时保持名称不变,按空格切换。

属性类型默认值
checkedbooleanNone
<label>
  <Switch defaultChecked /> Capture interactions
</label>

交互式文档