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
| Kind | Discriminator | What it is |
|---|---|---|
BooleanProp | type: boolean | A prop a consumer sets on or off |
StringProp | type: string, no enum | Text content, glyph/instance swap, or other open string values |
EnumProp | type: string + enum | One of a closed list — the variant axis |
NumberProp | type: number | A numeric value, open or enumerated |
SlotProp | type: slot | A place content goes, filled with structure rather than a scalar |
ImageProp | type: image | An image-valued prop |
ObjectProp | type: object | Named, 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 kind | Absent nullable means | Why |
|---|---|---|
StringProp | true | Open value set — nothing enumerates it |
NumberProp | true | Open value set |
SlotProp | true | Open content set; a slot may be empty |
ImageProp | true | Open value set |
EnumProp | false | enum 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: falseExtensions
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
- Prop Configurations — how a variant or example sets prop values
- Prop Binding — how an element member binds to a prop
- Key Formatting — how Figma property names become prop keys