Kumo

@cloudflare/kumo

Checkbox

A control that allows the user to toggle between checked and not checked.

<Checkbox label="Accept terms and conditions" />

Installation

import { Checkbox } from "~/components/checkbox/checkbox";

Usage

import { Checkbox } from "~/components/checkbox/checkbox";

export default function Example() {
  return <Checkbox label="Accept terms" />;
}

Examples

Default

<Checkbox label="Enable notifications" />

Checked

<Checkbox label="I agree" defaultChecked />

Disabled

<Checkbox label="Disabled option" disabled />

API Reference

PropTypeDefault
labelstringundefined
defaultCheckedbooleanfalse
disabledbooleanfalse