Single-style text is self-closing with a value attribute. Mixed-style text has <segment> children — each segment overrides font attrs for its run.

text

tagtext node

Single-style text is self-closing with a value attribute. Mixed-style text has <segment> children — each segment overrides font attrs for its run.

text-style references a named style; individual font attrs are omitted when a style is referenced. Variable fonts use font-variation; OpenType features use font-feature.

AttrTypeDescription
namestring
value requiredstring
xnumber
ynumber
wnumber | 'fill'w absent = hug text content
hnumber | 'fill'h absent = hug text content
text-stylestring
fill-stylestring
font-familystring
font-postscriptstring
font-style-namestring
font-sizenumber
font-weightnumber
font-stylenormal italic
font-variationstring
font-featurestring
fillcolor | token
line-heightnumber | string
letter-spacingnumber | string
baseline-shiftnumber
paragraph-spacingnumber
paragraph-indentnumber
alignleft right center justified
vertical-aligncenter top bottom
decorationunderline strikethrough
decoration-colorcolor
decoration-stylesolid dashed dotted wavy double
decoration-thicknessnumber
text-caseuppercase lowercase capitalize small-caps small-caps-forced
leading-trimnormal cap-height
text-resizehug hug-height fixed truncate
truncateboolean
max-linesnumber
overflowclip ellipsis
listdisc decimal none
list-levelnumber
list-markerstring
hrefstring
font-stretchnormal ultra-condensed extra-condensed condensed semi-condensed semi-expanded expanded extra-expanded ultra-expanded
directionltr rtl
writing-modehorizontal-tb vertical-rl vertical-lr
white-spacenormal nowrap pre pre-wrap pre-line
word-breaknormal break-all keep-all break-word
word-spacingnumber
text-underline-offsetnumber
text-decoration-skip-inkboolean
text-wrapwrap nowrap balance pretty stable
font-optical-sizingauto none
font-smoothingauto none antialiased subpixel-antialiased
text-renderingauto optimizeSpeed optimizeLegibility geometricPrecision

Inherited properties

AttrType / valuesNotes
opacitynumberLayer opacity, 0–1. Omitted when 1.
blendnormal, multiply, screen, overlay, darken, lighten, color-dodge, color-burn, hard-light, soft-light, difference, exclusion, hue, saturation, color, luminosity, linear-burn, linear-dodgeBlend mode against layers below. Omitted when normal.
maskbooleanPresence = true. Acts as an alpha mask for subsequent siblings.
rotationnumberRotation in degrees. Omitted when 0.
constraint-hleft, right, center, scale, stretchHorizontal pin/resize behavior. Default left (omitted).
constraint-vcenter, scale, stretch, top, bottomVertical pin/resize behavior. Default top (omitted).
absbooleanAbsolute child inside auto-layout. Presence = true. Replaces layout-position="absolute".
min-widthnumberMinimum width in px. Omitted when unset.
max-widthnumberMaximum width in px. Omitted when unset.
min-heightnumberMinimum height in px. Omitted when unset.
max-heightnumberMaximum height in px. Omitted when unset.
fliph, v, bothMirror transform — 'h', 'v', or 'both'.
filterstringCSS filter string, e.g. "brightness(1.2) contrast(0.9)".
isolationbooleanPresence = true. New stacking context for blend modes (isolation: isolate).
transform-originstringTransform origin, e.g. "top-left", "center", "0% 0%".
scale-xnumberCSS scaleX, e.g. 1.5.
scale-ynumberCSS scaleY, e.g. 0.8.
skew-xnumberHorizontal skew in degrees.
skew-ynumberVertical skew in degrees.
aspect-ratiostringAspect ratio, e.g. "16/9", "1/1".
z-indexnumberExplicit CSS z-index.
visiblebooleanfalse = visibility:hidden (preserved in file, skipped in render).

Single, mixed, decorated

<text value="Welcome back"
      font-family="Inter" font-size="22"
      font-weight="700" fill="#1C1C1E" />

<text x="24" y="80" w="300">
  <segment value="Pay " fill="#6E6E73" font-size="16" />
  <segment value="$42.00" fill="#1C1C1E" font-size="16" font-weight="700" />
</text>