Skip to content
← Inventory

Label

Renders an accessible label element that can be associated with form controls.

Usage

import { Label } from "@desk/ui/components/label";

Best practices

  • Point htmlFor at the control's id so clicking the label focuses/toggles it; a Label with no association is just styled text.

  • For checkbox/radio rows and fields, prefer CheckboxField/FieldLabel/RadioGroupItem, which generate the id/htmlFor pairing for you.

Props

Also exports

  • componentLabel