Argent

Checkbox

A choice that can be on or off.

On this device only.

import { Checkbox } from '@rajatweb/argent'

<Checkbox label="Send me updates" onCheckedChange={setUpdates} />

Props

PropTypeDefaultWhat it does
label requiredstring
checkedboolean
defaultCheckedboolean
disabledboolean
hintstring
onCheckedChange(checked: boolean) => void

Accessibility

  • The label is part of the target.

Do

  • Word it so that checked means yes.

Don’t

  • Use it for settings that apply at once. Use a Switch.