Skip to content

opacity

How opaque the element and its contents are, from fully transparent to fully opaque.

Path

…elements.<element>.styles.opacity

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.

UnitInterval (default: 1)

A number on the mathematical unit interval [0, 1], inclusive at both ends.

  • 0.5
  • 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: node.opacity

A TokenReference binds the variable; otherwise the raw number is written. The two forms sit on different scales: node.opacity takes 0-1, while a bound variable is evaluated on the percent scale Figma’s own UI shows, so a variable holding 36 renders as 36% opacity. An opacity variable is therefore authored 0-100, and a captured rawValue, read from the node rather than from the variable, is on 0-1.

CSS

Disposition: bound · Realised by: opacity

A literal ratio is emitted directly. A token is multiplied into a percentage — calc(<var> * 1%) — because an opacity variable is authored on a 0–100 scale.

Decisions

  • ADR-113 — Style defaults belong to the schema
  • ADR-121 — A unit-interval style type for opacity and cornerSmoothing

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