Skip to content

text

Renders a string. The only type that carries typography and text alignment.

Path

component-api:anatomy.<element>.type: text

Styles

Written on the element, not this anatomy entry — under a variant, slot content, or a composition. The style keys an element of this type may carry:

aspectRatio · bottom · centerHorizontalOffset · centerVerticalOffset · effects · end · height · layoutSizingHorizontal · layoutSizingVertical · locked · maxHeight · maxLines · maxWidth · minHeight · minWidth · opacity · position · rotation · start · textAlignHorizontal · textAlignVertical · textColor · textOverflow · top · typography · visible · width

Themes

Selected on the element, not this anatomy entry. Any element may select a theme for a token group, or inherit one from the nearest ancestor — deciding what its subtree’s token references resolve to.

Platform bindings

Figma

Disposition: bound · Realised by: TEXT node

Rules: typeDetection — with glyph, vector, container, line, ellipse, rectangle, polygon, star · wrapperCollapse — with container, glyph · primitivePromotion — with glyph, instance

Reads from a TEXT node; render creates one. The only type that carries typography, and the only one whose content is a string or a content binding.

CSS

Disposition: bound · Realised by: Css

Rules: elementSelectors — with glyph, vector, container, slot, instance, line, ellipse, rectangle

Its rule block is where typography and text alignment land — the only element type that carries them.

React

Disposition: bound · Realised by: a span carrying the element’s content

Rules: layoutWalk — with container, glyph, instance, slot · semanticsAndTags — with container, instance

span by default — or the tag a role decides. content emits as the text child; a content binding reads the bound prop instead.

Web Components

Disposition: bound · Realised by: a span in the shadow tree carrying the element’s content

Rules: layoutWalk — with container, glyph, instance, slot · semanticsAndTags — with container

span by default — or the tag a role decides, through the same shared precedence module React uses.

Decisions

  • ADR-058 — Collapsing Wrapped Primitives

Source

FormatFile
JSON Schemapackages/schema/schema/component.schema.json
TypeScriptpackages/schema/types/Element.ts
Specification§2, §11