Label example
This component is based on the native label element, it will automatically apply the correct labelling when wrapping controls or using the htmlFor attribute. For your own custom controls to work correctly, ensure they use native elements such as button or input as a base.
How to use this label
Props
Name | Type | Default | Description |
---|---|---|---|
asChild | boolean | false | Change the default rendered element for the one passed as a child, merging their props and behavior. |
htmlFor | string | - | The id of the element the label is associated with. |
Playground
Import from filigran-ui :
Import {Label} from 'filigran-ui'
<Label>Accept terms and conditions</Label>