The Label component must be used as a child of a Control component. It renders a <label> element and includes the necessary attributes to associate it with the control.
Usage
When using a Label inside a Control, you don't need to worry about the for attribute. Formsnap handles that for you.
Props
A Label accepts all props that a standard HTML <label> element would accept along with a few additional props:
Slot Props
Label provides a single slot prop, labelAttrs, which is only necessary when using the asChild prop.
Attributes
The following attributes are automatically applied to the element rendered by the Label component. This is also the shape of the labelAttrs slot prop when using the asChild prop.