Checkbox

A yes or no, with its label.

Example

tsx
<Stack direction="row" gap="sm" align="center">
  <Checkbox id="terms" defaultChecked />
  <Label htmlFor="terms">Email me when it ships</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 { Checkbox, Label, Stack } from "@dash/server";

Props

CheckboxProps

Also takes everything AriaAttributes does.
Prop
Type
Description
idstring
namestring
requiredboolean
checkedboolean
defaultCheckedboolean
disabledboolean
onChange(e: React.ChangeEvent<HTMLInputElement>) => void
PreviousSelect
On this page