Label API
API reference docs for the Stash Label
component. Learn about the props, CSS, and other APIs of this exported module.
Import
ts
import Label from '@leaflink/stash/Label.vue';
Props
Name | Type | Default | Description |
---|---|---|---|
disabled | boolean | - | Indicates whether the label is disabled. |
for | string | undefined | The `id` of the input element that this label is associated with. |
hasError | boolean | false | Indicates whether the label should be styled as an error. |
isDisabled | false | ||
isRequired | boolean | false | Indicates whether the input element that this label is associated with is required. |
legend | boolean | false | Indicates whether the wrapper element to be rendered should be a label or a legend. |
showOptional | boolean | false | Indicates whether the label should show that the input is optional. |
Slots
Name | Description |
---|---|
default | The label text |
Events
None