Checkbox

Displays a custom checkbox element.

This component inherits the props from Radix Checkbox primitive and supports common margin props m, mx, my, ml, mr, mt, mb. View source

By default, the checkbox is vertically aligned when placed inline with Text size 2. This is the most common font size we use with controls.

It is also well-aligned with Text size 2 in a default flex layout.

Use center alignment with other Text sizes.

You can also nest Flex elements to reliably align the checkbox with the first line of text. In this case, the height of the second Flex container matches the text line height.

Use the native disabled attribute to create a disabled checkbox.