Sourceful Energy

Checkbox

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

Installation

import { Checkbox } from "@sourceful-energy/ui"

Usage

Examples

Default Checked

Disabled

With Description

Receive updates about your energy usage.

Props

PropTypeDefaultDescription
checkedboolean | 'indeterminate'falseThe controlled checked state.
defaultCheckedbooleanfalseThe default checked state when uncontrolled.
onCheckedChange(checked: boolean) => void-Callback when the checked state changes.
disabledbooleanfalseWhether the checkbox is disabled.
idstring-The ID for associating with a label.

Accessibility

  • Uses native checkbox semantics via Radix UI
  • Supports keyboard navigation (Space to toggle)
  • Always pair with a Label for screen readers
  • Supports indeterminate state