Forms
Checkbox
On or off, or partly on for a group. The whole row with its label is the target.
Forms
On or off, or partly on for a group. The whole row with its label is the target.
Change the props on the right. The checkbox and its code follow.
import { Checkbox } from 'omuk-ui/checkbox';
import { Label } from 'omuk-ui/label';
<div className="flex items-center gap-2">
<Checkbox id="remember" defaultChecked />
<Label htmlFor="remember" className="font-normal">Keep me signed in</Label>
</div>A Label after the box, linked with htmlFor: a press on the label toggles the box too. The box’s own target reaches past its edge, so a small box is still easy to hit.
In a horizontal Field, the box sits on the first line of its label, and the description runs below.
The CLI stops working with it after 90 days. You can make a new one at any time.
indeterminate draws a dash for a box over a group when only some of the group are on. Work it out from the group on each render; a press on it then turns them all off or on.
Disabled has the hover fill and a thin edge, and a Label after it turns muted. aria-invalid gives the box a red edge.
Save the codes before you go on.
And every prop of a <button>.