Skip to main content

Text

Atombeta@macaw-ds/ui · since 0.1.0

Renders text in a named typographic role and tone. Every string on screen goes through it; nothing else sets font size or colour.

Contract

From the manifest's a11y block: what assistive technology sees, and every key the component handles.

Role
none (inherits the element's role: heading, paragraph, label, time). The HTML role attribute passes through.
Focusable
No. Interactive children keep their own focus.
Accessible name
Not applicable; Text is content. For label, the name is the text and it names the control via htmlFor.
Notes
  • Pick `as` for document structure first; use `role` for size. Screen readers navigate by heading level, not by font size.
  • Do not convey status by tone alone; pair a tone with words or an icon with a label.
Keyboard
KeysBehaviour

Not interactive; no keyboard handling.

Motion

This component does not animate or transition, so there is nothing to reduce.

Contrast

Computed at build time from the token values, against the background each colour is paired with.

TokenOnLightDark
fg.primarysurface.layer-119.67:1 AAA18.84:1 AAA
fg.secondarysurface.layer-110.00:1 AAA13.28:1 AAA
fg.mutedsurface.layer-16.53:1 AA6.33:1 AA
fg.numericsurface.layer-120.45:1 AAA19.67:1 AAA
fg.inversesurface.inverse19.67:1 AAA18.84:1 AAA
status.success-fgstatus.success-bg9.23:1 AAA11.70:1 AAA
status.warning-fgstatus.warning-bg8.69:1 AAA11.91:1 AAA
status.critical-fgstatus.critical-bg9.38:1 AAA11.09:1 AAA
status.info-fgstatus.info-bg9.04:1 AAA11.54:1 AAA
status.accent-fgstatus.accent-bg9.47:1 AAA11.54:1 AAA