Componentform0.81 KB gzipZero dependencies

Checkbox Card

Card-style checkbox with title, description and check pop.

Preview

Live Preview
Open ↗

Installation

Tokens guide →

Add to your project via CLI (zero dependencies, code you own):

npx bigbullui add checkbox-card

Or install the full npm package:

npm install bigbullui

Usage

tsx3 lines
import { CheckboxCard } from "@/components/ui/checkbox-card"; <CheckboxCard />

Source code

checkbox-card.tsx + 1 helper

Zero third-party dependencies (2 local files shown in tabs below).

tsxcheckbox-card.tsx60 lines
"use client"; import * as React from "react";import { cn } from "./lib/utils"; export interface CheckboxCardProps extends React.HTMLAttributes<HTMLLabelElement> {  title: string;  description?: string;  checked?: boolean;  defaultChecked?: boolean;  onCheckedChange?: (checked: boolean) => void;  disabled?: boolean;} /** Card-style checkbox: selectable frame + description + checkmark. */export function CheckboxCard({ title, description, checked, defaultChecked, onCheckedChange, disabled, className, ...props }: CheckboxCardProps) {  const [internal, setInternal] = React.useState(defaultChecked ?? false);  const isOn = checked ?? internal;

Props

Interactive Prop Playground

Tweak parsed AST props below to generate ready-to-paste JSX.

tsx3 lines
import { CheckboxCard } from "@/components/ui/checkbox-card"; <CheckboxCard />
PropTypeDescription
titlestringPrimary heading or title text.
descriptionstringDescriptive helper or subtitle text.
checkedbooleanControlled checked state.
defaultCheckedbooleanInitial checked state when uncontrolled.
onCheckedChange(checked: boolean) => voidCallback invoked on checked change.
disabledbooleanDisables interaction and applies disabled styling.