EccUtilsDesignLabel Component
2.0.0-alpha.6
<ecc-utils-design-label/>
EccUtilsDesignLabel
Overview
The ecc-utils-design-label
component provides an accessible label for form elements. It is styled to match the design system and supports disabled states.
This component is a simple wrapper around the native HTML <label>
element, providing consistent styling.
Usage
Basic Label
This example shows a basic label.
Label for an Input
This example demonstrates associating a label with an input field using the for
property.
Properties
Property | Type | Default | Description |
---|---|---|---|
for | string | "" | The id of the element the label is associated with. |
disabled | boolean | false | When true , applies disabled styling to the label. |
for
Associates the label with a form control. In React, use htmlFor
.
<EccUtilsDesignLabel htmlFor="username">Username</EccUtilsDesignLabel>
disabled
Applies a disabled visual style to the label, indicating that the associated input is not interactive.
<EccUtilsDesignLabel disabled={true}>Disabled Label</EccUtilsDesignLabel>
Events
This component does not emit any custom events.