๐ŸŽฏ Nexus teaches Next.js from foundations to professional systemsโ€ขโšก App Router, React 19, and Tailwind v4 in one learning pathโ€ข๐Ÿงฉ Inspect real components, layouts, and reusable patternsโ€ข๐Ÿ› ๏ธ Build production discipline, not just polished demosโ€ข๐Ÿ“š Tracks, references, and design studies in one placeโ€ข๐ŸŽฏ Nexus teaches Next.js from foundations to professional systemsโ€ขโšก App Router, React 19, and Tailwind v4 in one learning pathโ€ข๐Ÿงฉ Inspect real components, layouts, and reusable patternsโ€ข๐Ÿ› ๏ธ Build production discipline, not just polished demosโ€ข๐Ÿ“š Tracks, references, and design studies in one placeโ€ข๐ŸŽฏ Nexus teaches Next.js from foundations to professional systemsโ€ขโšก App Router, React 19, and Tailwind v4 in one learning pathโ€ข๐Ÿงฉ Inspect real components, layouts, and reusable patternsโ€ข๐Ÿ› ๏ธ Build production discipline, not just polished demosโ€ข๐Ÿ“š Tracks, references, and design studies in one placeโ€ข๐ŸŽฏ Nexus teaches Next.js from foundations to professional systemsโ€ขโšก App Router, React 19, and Tailwind v4 in one learning pathโ€ข๐Ÿงฉ Inspect real components, layouts, and reusable patternsโ€ข๐Ÿ› ๏ธ Build production discipline, not just polished demosโ€ข๐Ÿ“š Tracks, references, and design studies in one placeโ€ข
Forms

Checkbox

Accessible checkbox with label, description, indeterminate state, and three size options

Quick Preview

Structure

Anatomy of the Checkbox โ€” a check control with optional label and description.

โœ“Check box
label (optional)
description (optional)
Box โ€” shows checkmark when checkedLabel โ€” optional textDescription โ€” optional sub-text

States

Click any checkbox to toggle it live.

Checkbox โ€” all states

Click the interactive cells to toggle live

6 states

Unchecked

Default โ€” not selected

Checked

Selected

Indeterminate

Partial selection

Disabled โ€” off

Cannot interact

Disabled โ€” on

Locked in checked

With description

Label + helper text

Sizes

Three size tokens โ€” sm md (default) lg.

Sizes โ€” sm / md / lg

Click to toggle each size

3 states

Small โ€” sm

Compact, inline use

Medium โ€” md

Default size

Large โ€” lg

Touch-friendly

Installation

// Copy the Checkbox component from
src/components/forms/Checkbox.tsx

Usage

'use client'
import { useState } from 'react'
import { Checkbox } from '@/components/forms/Checkbox'
export default function Example() {
const [checked, setChecked] = useState(false)
return (
<Checkbox
id="tos"
checked={checked}
onCheckedChange={setChecked}
label="I agree to the terms of service"
/>
)
}

Examples

With Description

Indeterminate (Select All)

Prompt Preview

Copy a prompt that recreates this UI

Paste this into your AI coding assistant to generate code that closely matches the reference, including color, size, shape, typography, spacing, and polish.

Copy-ready AI prompt

Starts from the current visual reference and project constraints.

Tweak only product-specific copy or data after the first generation pass.

Props

PropTypeDefaultDescription
checkedbooleanfalseControlled checked state
onCheckedChange(checked: boolean) => void-Change handler
indeterminatebooleanfalseShow indeterminate (mixed) state
labelstring-Label text shown beside the checkbox
descriptionstring-Helper text shown below the label
disabledbooleanfalseDisable the checkbox
size"sm" | "md" | "lg""md"Checkbox and label size
idstring-HTML id for label association

Features

  • โœ“Three sizes: sm, md, lg
  • โœ“Indeterminate state support
  • โœ“Accessible label and description
  • โœ“Focus ring for keyboard navigation
  • โœ“Disabled state
  • โœ“forwardRef support
  • โœ“Client Component