Switch
InputMITToggle switch for boolean settings with smooth animation.
bun add @otfdashkit/ui
Preview
SwitchInput
Loading Storybook preview…
Code
@otfdashkit/uiimport { Switch } from '@otfdashkit/ui'
export function Example() {
return (
<div className="flex flex-col gap-3">
<div className="flex items-center gap-2">
<Switch id="airplane" />
<label htmlFor="airplane" className="text-sm font-medium">Airplane Mode</label>
</div>
<div className="flex items-center gap-2">
<Switch id="on" defaultChecked />
<label htmlFor="on" className="text-sm font-medium">Enabled by default</label>
</div>
</div>
)
}
Free with the SDK. This component ships in @otfdashkit/ui under the MIT license.