Label
Caption that names and activates the control referenced by its for attribute, with a required marker.
Attributes
| Name | Type | Default | Description |
|---|---|---|---|
disabled | boolean | false | Disables the label: clicks no longer reach the control and the text is dimmed. |
required | boolean | false | Shows the required indicator after the text. |
for | string | — | `id` of the control this label describes. It is looked up in the label's own root, then among its siblings. |
CSS custom properties
Grouped by the element and state they target. Click a group to collapse it; click a name to copy it.
| Name | Type | Default | Description |
|---|---|---|---|
--c2-label__container--gap | pixel | 4px | |
--c2-label__container--color | color | inherit | |
--c2-label__container--font-family | font-family | inherit | |
--c2-label__container--font-size | pixel | inherit | |
--c2-label__container--font-weight | font-weight | inherit | |
--c2-label__container--line-height | line-height | inherit | |
--c2-label__container--letter-spacing | pixel | inherit | |
--c2-label__container--text-transform | text-transform | inherit | |
--c2-label__container__hover--color | color | — | |
--c2-label__container__disabled--opacity | opacity | 0.38 | |
--c2-label__required-indicator--color | color | rgb(211, 21, 16) | |
--c2-label__required-indicator--font-size | pixel | inherit | |
--c2-label__required-indicator--font-weight | font-weight | inherit | |