sudharshanpanidev

Checkbox

Forms

About

An accessible native checkbox input with optional label, helper description text, and an indeterminate "select all" state.

Built with React and Tailwind. Copy the prompt and paste it into Claude Code, Cursor or Lovable: your agent adds Checkbox to your project and fits it to your theme.

Code

How Checkbox is used: the demo's code. The component's own source comes with a free account.

Usage.tsx

import { Checkbox } from "@/components/ui/checkbox";

export default function CheckboxDemo() {
  return (
    <div
      className="flex w-full max-w-sm flex-col gap-4 rounded-lg p-6"
      style={{
        background: "var(--fp-color-bg)",
        color: "var(--fp-color-text)",
      }}
    >
      <Checkbox label="Notify customer by email" />
      <Checkbox label="Notify customer by email" defaultChecked />
      <Checkbox label="Select all orders" indeterminate />
      <Checkbox
        label="Notify customer by email"
        description="We'll send a receipt and tracking link."
      />
      <Checkbox label="Notify customer by email" disabled />
    </div>
  );
}

More by sudharshanpanidev

View all
  • Stepper

    Stepper

    7
  • Empty State

    Empty State

    6
  • Button

    Button

    4
  • Select

    Select

    3
  • Status Badge

    Status Badge

More in Forms

View all
  • Form

    Form

    10
  • Contact Form

    Contact Form

    33
  • Premium Auth

    Premium Auth

    616
  • Paper Plane

    Paper Plane

    113
  • Contact Card

    Contact Card

    1.1K
  • Form

    Form

    18
  • Onboarding Stepper

    Onboarding Stepper

    14
  • Input

    Input

    14