Usage
Pair a <Label>
with an input element to provide an accessible label. To associate the label with the form element, wrap the form element within <Label>
:
Alternatively, you can pass an id string to the label’s htmlFor
prop:
API Reference
Label
Inherits properties from HTMLLabelElement
.
Prop | Type | Default |
---|---|---|
asChild | boolean | false |
htmlFor | string | |
theme | "dark" "light" | "light" |