Components / PaperCheckbox

Forms

PaperCheckbox

Square checkbox with clear checked and focus states.

↗ sharp edges, clear choices.

Preview

import * as React from 'react'
import { cn } from '@/lib/utils'

export interface PaperCheckboxProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'type'> {
  label?: string
  hint?: string

Installation

Copy this file into your project, export its barrel, and then add it to the master UI index.

  1. Step 1.Create this file:
    components/ui/paperCheckbox/paperCheckbox.tsx
  2. Step 2.Create the barrel:
    components/ui/paperCheckbox/index.ts
  3. Step 3.Add this export in components/ui/index.ts:
    export * from './paperCheckbox'

Variants

Unchecked

Checked

Disabled

Props

PropTypeDefaultDescription
labelstringundefinedPrimary label text.
hintstringundefinedSecondary helper text.
defaultCheckedbooleanfalseInitial checked state for uncontrolled usage.

Examples

Consent checkbox

Use with concise legal language and optional hint.

<PaperCheckbox label="I agree to the terms" />

Preference toggles

Group checkboxes for independent notification settings.

<PaperCheckbox label="Product updates" defaultChecked />