Checkbox

A labelled, controlled checkbox.

Import

import { Checkbox } from "@tarve/core";

Usage

Checkbox.tsx
import { Checkbox } from "@tarve/core";

let accepted = false;

<Checkbox
  label="Accept terms and conditions"
  checked={accepted}
  onCheckedChange={(checked) => {
    accepted = checked;
  }}
/>

Props

PropTypeDefault
checked required boolean—
label required string—
disabled boolean—
onCheckedChange (checked: boolean) => void—

Common props

Shared by every component. See descriptions →

childrenhighlightidkeymotionFromonHighlightonPasteonTransitionEndrovingGroupstyle