Switch

A setting that is on or off and applies at once.

Example

tsx
<Stack direction="row" gap="sm" align="center">
  <Switch defaultChecked />
  <Label>Live updates</Label>
</Stack>

Usage

Pages are built on the server: import the tags from @dash/server and return the tree. The browser runtime draws it.
tsx
import { Switch, Label, Stack } from "@dash/server";

Props

SwitchProps

Prop
Type
Description
checkedboolean
defaultCheckedboolean
disabledboolean
onCheckedChange(checked: boolean) => void
PreviousRadio group
NextSlider
On this page