rokle

Personality

20
40
70
15

Active brand: Meridian

Adjust sliders to see every component on the page respond in real time.

Checkbox

Form checkbox input. Single and indeterminate states.

Examples

Default

Checked

Disabled

Group

Multiple checkboxes forming a selection group.

Card Selection

Checkboxes styled as selectable cards.

With Description

Checkbox with label and supporting description text.

Installation

pnpm add @rokle/components @rokle/tokens

Installs with the default Rokle brand. Generate a custom brand on rokle.app to use your own colours and personality.

Usage

import { Checkbox } from "@rokle/components";
import { Checkbox } from "@rokle/components";

export function Example() {
  return (
    <div className="flex flex-col gap-3">
      <label className="flex items-center gap-2">
        <Checkbox /> Accept terms and conditions
      </label>
      <label className="flex items-center gap-2">
        <Checkbox defaultChecked /> Receive email updates
      </label>
      <label className="flex items-center gap-2">
        <Checkbox disabled /> Disabled option
      </label>
    </div>
  );
}

Source

The implementation source for this component. Copy it into your project and customise.

API Reference

PropTypeDefaultDescription
checkedbooleanfalseChecked state.
disabledbooleanfalseDisable interaction.