Forms
Label
The name of a field, linked to it, in the form’s type.
Forms
The name of a field, linked to it, in the form’s type.
Change the props on the right. The label and its code follow.
import { Input } from 'omuk-ui/input';
import { Label } from 'omuk-ui/label';
<div className="flex flex-col gap-1">
<Label htmlFor="name">Environment name</Label>
<Input id="name" />
</div>A medium-weight label, linked to its field with htmlFor. A press on the label puts the focus in the field.
After a checkbox or a switch, with the normal weight. A press on the label toggles the control. When the control before it is disabled, the label turns muted on its own.
The label is a row with gap 2, so a muted note such as “Optional” can sit beside the name, inside the label.
Label takes every prop of a <label>, and adds none.