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
NamelabelTypestringDefault—DescriptionLabel rendered next to the switch.
NamehelperTextTypestringDefault—DescriptionSupplementary text below the label.
NameerrorTypestring | booleanDefault—DescriptionError state message or styling.
NamedisabledTypebooleanDefaultfalseDescriptionPrevents interaction.
NamecheckedTypebooleanDefault—DescriptionControlled checked state of the switch.