Checkbox Pro

A switchable element to mark an option as checked or unchecked.

Cooler than a perfectly timed plot twist.

Installation

npx shadcn@latest add https://scrollxui.dev/registry/checkbox-pro.json 

Usage

import { Checkbox } from "@/components/ui/checkbox"
<Checkbox />

API Reference

Checkbox Pro

A switchable element to mark an option as checked or unchecked.

Props

PropertyTypeDefaultDescription
asChildbooleanfalse
Render custom child. Used in CheckboxPro & Indicator.
defaultCheckedboolean | 'indeterminate'false
Initial state. CheckboxPro only.
checkedboolean | 'indeterminate'
Controlled state. CheckboxPro & Indicator.
onCheckedChangefunction
State change callback. CheckboxPro only.
disabledbooleanfalse
Disable interaction. CheckboxPro & Indicator.
requiredbooleanfalse
Required for forms. CheckboxPro only.
namestring
Form name. CheckboxPro only.
valuestring
Form value. CheckboxPro only.
idstring
Element ID. CheckboxPro only.
classNamestring
Custom styles. CheckboxPro & Indicator.
aria-labelstring
Accessibility. CheckboxPro only.
labelledbystring
Accessibility. CheckboxPro only.
describedbystring
Accessibility. CheckboxPro only.
forceMountboolean
Always show indicator. Indicator only.
childrenReactNode
Custom content when asChild is true. Both components.

Built withby Ahdeetai.