Skip to content

textAlignHorizontal

Where text sits along the writing direction (ADR-064).

Path

…elements.<element>.styles.textAlignHorizontal

Elements Supported

text

Value

  • "START" (default) — Text aligns to the inline-start edge — the left in a left-to-right script.
  • "CENTER" — Text centres on the inline axis.
  • "END" — Text aligns to the inline-end edge — the right in a left-to-right script.
  • "JUSTIFY" — Word spacing stretches so every line but the last meets both edges.

Platform bindings

Figma

Disposition: bound · Realised by: node.textAlignHorizontal

Inverts the capture mapping: the schema’s logical START, CENTER, END and JUSTIFY become Figma’s physical LEFT, CENTER, RIGHT and JUSTIFIED. All four schema values are covered, so the fallback is unreachable for valid input. Requires the node’s font to be loaded first.

CSS

Disposition: bound · Realised by: textAlign

Remaps the schema’s logical values to CSS logical keywords: START to start, END to end, JUSTIFY to justify. All four schema values are covered, so the fallback is unreachable for valid input.

Figma key

Reads from textAlignHorizontal, remapped to logical directions (LEFT→START, RIGHT→END, JUSTIFIED→JUSTIFY). See ADR 064 — Text Align Horizontal.

Decisions

  • ADR-064 — Tighten textAlignHorizontal to a Logical-Direction String Enum
  • ADR-113 — Style defaults belong to the schema

Rules

RuleStatement
DSPEC-44Every property of Styles declares a default, and its value validates against that property’s own schema
DSPEC-45A declared default is a literal, never a TokenReference, PropBinding or Conditional

Source

FormatFile
JSON Schemapackages/schema/schema/styles.schema.json
TypeScriptpackages/schema/types/Styles.ts
Specification§4.1a, §11