Get StartedComponentsStylingThemingMath & Science
MCP

Forms

Toggle

A two-state button that is either on or off.

Markdown

Import

tsx
import { Toggle } from "@indoku/ui"

Examples

Basic usage

Props

Toggle

PropTypeDefaultDescription
variant"default" | "outline"default"default" is transparent (ghost), "outline" has a border.
pressedboolean–
defaultPressedboolean–
onPressedChange(pressed: boolean) => void–

* required. Style props and HTML attributes are accepted as well.

Created by @indokudev