Park UI Logo
GitHub
Components
Switch

Switch

A control element that allows for a binary selection.

import { Switch, type SwitchProps } from '~/components/ui/switch'

export const Demo = (props: SwitchProps) => {
  return (
    <Switch defaultChecked {...props}>
      Label
    </Switch>
  )
}

Usage

import { Switch } from '~/components/ui/switch'

Installation

npx @park-ui/cli components add switch