API reference
label[tngLabel] is intentionally small: it leaves native label behavior intact and only adds state hooks for your styling layer.
Directive attachment
html
<label tngLabel for="release-owner">Release owner</label>
| Input | Type | Default | Details |
|---|---|---|---|
disabled | boolean | false | Adds data-disabled for reduced-emphasis label styling. |
required | boolean | false | Adds data-required so your CSS can append or color a required indicator. |
Output attributes
| Attribute | When it appears | Purpose |
|---|---|---|
data-slot="label" | Always | Base selector for typography, spacing, and layout styling. |
data-required | When required is true | Required marker styling without owning a wrapper component. |
data-disabled | When disabled is true | Muted label styling that mirrors a disabled control state. |
Usage notes
- Use
for/idfor text fields, selects, and textareas when the label and control are siblings. - Wrap the control inside
label[tngLabel]when you want a compact checkbox or radio row. requiredis visual only; keep nativerequiredoraria-requiredon the control.disabledon the label does not disable the input; apply it to the control as well.
Wrapped checkbox row
html
<label tngLabel>
<input type="checkbox" />
Notify the release channel
</label>