Documentation

Switch

A control that allows the user to toggle between on and off.

Examples

import { Switch } from 'kalki-design'

<Switch></Switch>

Installation

npx kalki-design add switch

Usage

import { Switch } from 'kalki-design'

export default function Example() {
  return <Switch />
}

API Reference

NameTypeDefaultDescription
NamelabelTypestringDefaultDescriptionLabel rendered next to the switch.
NamehelperTextTypestringDefaultDescriptionSupplementary text below the label.
NameerrorTypestring | booleanDefaultDescriptionError state message or styling.
NamedisabledTypebooleanDefaultfalseDescriptionPrevents interaction.
NamecheckedTypebooleanDefaultDescriptionControlled checked state of the switch.