Modus UI

Tally Box

Web (React)

A checkbox whose box springs full and strikes through its label.

Labels are set in the heading serif, the box is a near-square in the primary colour. Good for checklists where finishing an item should feel satisfying.

Modus / Tally Box

Installation

CLI

npx @modus-ui/cli add tally-box

Manual

  1. Copy the code from the component tab.
  2. Create a file at components/ui/tally-box.tsx.
  3. Paste the code.

Usage

tsx
import { TallyBox } from "@/components/ui/tally-box";

export default function Example() {
  return <TallyBox />;
}

Props

PropTypeDefaultDescription
labelstring"Proof the galleys"-
checkedany--
defaultCheckedbooleanfalse-
onChangeany--
disabledbooleanfalse-
colorstring"hsl(var(--foreground))"-
fillColorstring"hsl(var(--primary))"-
checkColorstring"hsl(var(--primary-foreground))"-
boxSizenumber28-
boxRadiusnumber4-
fontSizenumber20-
bouncenumber0.2-
strikeLagnumber0.12-
doneOpacitynumber0.42-
strikestring"left"-
ariaLabelany--

Comments

  • No comments yet.