Command Palette

Search for a command to run...

Docs
Checkbox Simple

Checkbox Simple

A simple checkbox component with label and optional description.

Installation

Usage

import CheckboxSimple from "@/components/ruixen/checkbox-simple";
 
export default function MyComponent() {
  return (
    <div className="flex flex-col gap-4">
      <CheckboxSimple label="Accept notifications" />
      <CheckboxSimple
        label="Subscribe to newsletter"
        description="Get updates about new features"
      />
    </div>
  );
}

Props

PropTypeDefaultDescription
checkedboolean-Controlled checked state
defaultCheckedbooleanfalseDefault checked state
onCheckedChange(checked: boolean) => void-Callback when state changes
labelstring-Label text
descriptionstring-Optional description text
disabledbooleanfalseDisable the checkbox
classNamestring-Additional CSS classes

Features

  • Clean, minimal design
  • Optional label and description
  • Controlled and uncontrolled modes
  • Accessible focus states
  • Light and dark mode support