Introducing PrimeReact v11-alpha 🎉Discover Now

Checkbox

Checkbox is an extension to standard checkbox element with theming.

preview

Installation#

npx shadcn@latest add @primereact/checkbox

Usage#

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

Examples#

Basic#

basic-demo

Sizes#

Use the size property to change the size of a checkbox.

sizes-demo

Filled#

Specify the filled property to display the component with a higher visual emphasis than the default outlined style.

filled-demo

Disabled#

Use the disabled property to disable a checkbox.

disabled-demo

Invalid#

Specify the invalid property to display the component with a red border.

invalid-demo

Indeterminate#

Use the indeterminate property to display an indeterminate state.

indeterminate-demo