Skip to content

Props

Props define the configurable inputs of a component — an open, name-keyed map, where each entry is one of seven kinds discriminated by its type member. A consumer reads type before interpreting the rest. Each kind has its own reference page, generated from the schema; this page is the map.

Kinds

KindDiscriminatorWhat it is
BooleanProptype: booleanA prop a consumer sets on or off
StringProptype: string, no enumText content, glyph/instance swap, or other open string values
EnumProptype: string + enumOne of a closed list — the variant axis
NumberProptype: numberA numeric value, open or enumerated
SlotProptype: slotA place content goes, filled with structure rather than a scalar
ImageProptype: imageAn image-valued prop
ObjectProptype: objectNamed, individually typed scalar members

StringProp and EnumProp share type: string; the presence of enum is what discriminates them.

Nullability

nullable is optional on every kind that carries it. Its absence is meaningful, and what it means depends on whether the kind’s value set is open or closed:

Prop kindAbsent nullable meansWhy
StringProptrueOpen value set — nothing enumerates it
NumberProptrueOpen value set
SlotProptrueOpen content set; a slot may be empty
ImageProptrueOpen value set
EnumPropfalseenum lists every accepted value, and null is not one of them
BooleanProp(no member)Booleans are never nullable

An explicit nullable: false on an open-valued prop asserts that a value always exists — useful when a code-only prop was authored with a non-empty default:

props:
# No nullable key — accepts null
label:
type: string
# Explicitly asserts a value is always present
headingLevel:
type: number
default: 2
nullable: false

Extensions

Every kind carries an optional $extensions object — vendor provenance under reverse-domain keys, currently com.figma only. A consumer never needs it to interpret the prop; the render direction reads it to reverse what capture recorded.

Platform bindings

How each kind is realised per platform — and the joint rules deciding which kind a Figma property even becomes — is declared in the platform bindings:

  • Figma — property definitions, variant axes, code-only props, object folding
  • React — typed parameters, slots to children, state classification
  • Web Components — properties and reflected attributes
  • CSS — props as selection, never declarations

See Also