Skip to content

glyph

Renders an icon, identified by the library’s glyph convention rather than by node type alone.

Path

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

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 · fillColor · height · layoutSizingHorizontal · layoutSizingVertical · locked · maxHeight · maxWidth · minHeight · minWidth · opacity · position · rotation · start · top · 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: INSTANCE or VECTOR reclassified by the library's glyphs convention

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

No Figma node type is a glyph. Membership comes from the declared glyphs convention — name pattern or structural form (ADR-103) — and content carries the glyph name. Render swaps in the glyph component’s instance by name.

CSS

Disposition: bound · Realised by: Css

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

The rule block styles the glyph’s box and color; the artwork itself is the emitting platform’s concern, not the stylesheet’s.

React

Disposition: approximated · Realised by: an aria-hidden span painted by CSS mask

Rules: layoutWalk — with container, text, instance, slot

React has no glyph component to instantiate, so the exported asset paints as a mask over currentColor — visually faithful, but a decorative box rather than an SVG the consumer can reach into.

Web Components

Disposition: approximated · Realised by: a mask-painted box via the shared glyph runtime

Rules: layoutWalk — with container, text, instance, slot

The asset paints as a CSS mask through the runtime’s glyphUrl, which builds the URL from a settable base so an app not served from the site root still loads its icons. Approximated for the same reason as React: a decorative box, not an SVG a consumer can reach into.

Decisions

  • ADR-058 — Collapsing Wrapped Primitives
  • ADR-103 — Structural glyph membership — glyphs.structure convention

Source

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