width
The element’s width in pixels when horizontal sizing is FIXED.
Path
…elements.<element>.styles.width
Elements Supported
component · container · ellipse · glyph · instance · line · polygon · rectangle · slot · star · text · vector
Value
TokenReference
A design token, written as a $token path plus a $type, as in { $token: Color/On surface, $type: color }. The consuming platform resolves it to a value.
number (default: 0)
null
Themes
A TokenReference written here resolves under the theme in force on this element — the one it selects in themes, or the nearest ancestor’s. The same token path yields a different value under a different theme.
Platform bindings
Figma
Disposition: bound · Realised by: rule autoVsAbsoluteLayout
CSS
Disposition: bound · Realised by: rule intrinsicSize
Resolved jointly with
This key does not map on its own. Its rule’s ordered case table is linked above.
autoVsAbsoluteLayout — Figma
bottomcenterHorizontalOffsetcenterVerticalOffsetendheightlayoutSizingHorizontallayoutSizingVerticalpositionstarttop
intrinsicSize — CSS
Decisions
- ADR-004 — Add
aspectRatiotoStyles - ADR-075 —
conventions.primitives— a Declared Table from Styles to a Component’s Props - ADR-081 —
defaultFillWidth— the Width a Fill-Width Root Fills - ADR-113 — Style defaults belong to the schema
- ADR-124 — Styles on InstanceExample
Rules
| Rule | Statement |
|---|---|
| DSPEC-44 | Every property of Styles declares a default, and its value validates against that property’s own schema |
| DSPEC-45 | A declared default is a literal, never a TokenReference, PropBinding or Conditional |
| DSPEC-47 | Jointly resolved keys are stated as an ordered case table over a declared operand set, not as prose |
| DSPEC-65 | A producer MUST record InstanceExample.styles only for an example instance declaring non-HUG horizontal sizing — layoutSizingHorizontal: 'FIXED' with width in raw px — and MUST omit it otherwise |
Source
| Format | File |
|---|---|
| JSON Schema | packages/schema/schema/styles.schema.json |
| TypeScript | packages/schema/types/Styles.ts |
| Specification | §4.1a, §11 |