Skip to content

Label

The Label component is used to provide a descriptive text label for form controls such as Input, Checkbox, Radio, and Textarea. Associating a label with a form control is a fundamental aspect of web accessibility.

Add the Label component to your project using the OrbitUI CLI:

Terminal window
npx orbitkit@latest add label

Import the Label component and use it next to your form control. The most important attribute for a Label is for, which should match the id of the form control it is associated with. Clicking on the label text will focus the associated control.

The Label component accepts all standard HTML attributes for a <label> element.