ham7a311

Fraction Checkbox

Forms 3

About

A select-all checkbox for a list that shows partial selection as a gauge, filling its box in proportion to how many child items are checked instead of just showing an indeterminate dash.

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

Code

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

Usage.tsx

"use client";

import { FractionCheckbox } from "@/components/ui/fraction-checkbox";

export default function Demo() {
  return (
    <div className="flex min-h-full w-full items-center justify-center bg-background p-8">
      <FractionCheckbox
        title="Notify me about"
        initial={["deploys", "mentions"]}
        options={[
          { id: "deploys", label: "Deploys", meta: "email" },
          { id: "mentions", label: "Mentions", meta: "push" },
          { id: "reviews", label: "Review requests", meta: "push" },
          { id: "billing", label: "Billing", meta: "email" },
          { id: "digest", label: "Weekly digest", meta: "email" },
        ]}
      />
    </div>
  );
}

More by ham7a311

View all
  • Wave Mesh

    Wave Mesh

    253
  • Route Globe

    Route Globe

    195
  • Glass Tiles

    Glass Tiles

    183
  • Orbit Ring Stats

    Orbit Ring Stats

    82
  • Glyph Swell

    Glyph Swell

    78
  • Fan Deck Card

    Fan Deck Card

    77
  • Ask Bar

    Ask Bar

    63
  • Glass Ribbons

    Glass Ribbons

    53

More in Forms

View all
  • Form

    Form

    7
  • Login 2

    Login 2

    16
  • Contact Form

    Contact Form

    33
  • Contact Card

    Contact Card

    1.1K
  • Book A Demo 1

    Book A Demo 1

    95
  • Premium Auth

    Premium Auth

    613
  • Onboarding Stepper

    Onboarding Stepper

    13
  • Authentication Card

    Authentication Card

    52