API reference
<tng-label> is a styled wrapper around the tngLabel primitive. Most component consumers work with the wrapper, but it helps to understand what the primitive forwards.
Primitive: label[tngLabel]
Primitive attachment
html
<label tngLabel for="release-owner">Release owner</label>
| Input | Type | Default | Notes |
|---|---|---|---|
disabled | boolean | false | Adds data-disabled for reduced-emphasis label styling. |
required | boolean | false | Adds data-required; keep required semantics on the control itself. |
Component: <tng-label>
Component attachment
html
<tng-label forId="release-owner" [required]="true">Release owner</tng-label>
<input id="release-owner" aria-required="true" />
| Input | Type | Default | Notes |
|---|---|---|---|
forId | string | '' | Maps to native for when the trimmed value is non-empty. |
required | boolean | false | Shows the built-in asterisk and forwards data-required. |
disabled | boolean | false | Forwards data-disabled to the internal label for muted styling. |
State attributes
data-slot="label"is always emitted on the internal label element.data-requiredappears when the label should render required emphasis.data-disabledappears when the label should render reduced emphasis.- The component does not disable or require the control for you; apply those semantics to the actual input, checkbox, radio, or textarea.