Examples
Basic
Prop | Default | Type | Description |
---|---|---|---|
as | label | AsTag , Component | The element or component this component should render as. Can be overwrite by asChild. |
asChild | boolean | boolean | Change the default rendered element for the one passed as a child, merging their props and behavior. Read our Composition guide for more details. |
for | string | string | The id of the element the label is associated with. |
label | string | string | The label text, An alternative to the default slot. |
Read more in Radix Label Root API.
Slots
Name | Props | Description |
---|---|---|
default | - | The content slot. |
Presets
shortcuts/label.ts
Props
types/label.ts