Park UI

Checkbox

A form input component for toggling between checked and unchecked states.

Installation

Usage

Info

If you prefer a closed component composition, check out the snippet below.

Examples

Variants

Customize the appearance with different visual styles to match your design:

Colors

Use the colorPalette prop to change the color of the checkbox:

Sizes

Adjust the size to match surrounding text or interface elements:

States

Pass the disabled or invalid prop to the Checkbox.Root component to change the visual state of the checkbox.

Controlled

Use the checked and onCheckedChange props to control the checkbox state.

Label

Here's an example of how to change the label position to the left:

Indeterminate

Set the checked prop to indeterminate to show the checkbox in an indeterminate state.

Description

Here's an example of how to add some further description to the checkbox:

Render an anchor tag within the Checkbox.Label to add a link to the label.

Closed Component

Here's how to setup the avatar for a closed component composition.

To use the closed component, simply import and use it like this:

Props

Root

Group

GroupProvider

Indicator