Atelier UI

搜索组件…

搜索组件…

iOS Round Toggle Button

控制中心风格圆形开关按钮:图标 + 标题,按下后切换为主题色,带 aria-pressed。

在沙盒中编辑

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

属性

IOSRoundToggleButtonProps

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

属性类型默认值说明
icon* 必填React.ReactNode——
label* 必填string—Caption under the circle; also used as the accessible name
tintstring"#007aff"Color of the "on" state
pressedboolean——
defaultPressedbooleanfalse—
onPressedChange(pressed: boolean) => void——

安装

$ npx shadcn@latest add https://chromotion.dev/r/ios-round-toggle-button.json

同类组件