Label
A control that adds a label to an input element.
Features
- Supports nested controls
- Disables text selection when double clicking the label
- Can be used multiple times from a single instance of the builder
Anatomy
- Root: The root container for the label
Usage
To create a label, use the createLabel
builder function and apply the root action to the label
element.
API Reference
createLabel
The builder function used to create the label component.
Props
Prop | Default | Type / Description |
Elements
Element | Description |
The builder store used to create the label root. |
root
The label element
Data Attributes
Data Attribute | Value |
[data-melt-label] | Present on all label elements. |
Custom Events
Event | Value |
m-mousedown | (e: ) => void |
On This Page