ObjectProp
Object property definition for a prop whose value is an object of named, individually typed scalar members. Defaults live per member — there is no top-level default or nullable.
Path
component-api:props.<prop>
Members
| Member | Type | Required | Description |
|---|---|---|---|
type | 'object' | Yes | The discriminator — always 'object'. |
members | object | Yes | Named members, each an existing scalar prop definition. |
$extensions | PropExtensions | No | Platform provenance under reverse-domain keys. |
Example
type: objectmembers: visible: type: boolean default: true label: type: string examples: [New] tone: type: string default: neutral enum: [neutral, positive, critical] count: type: number default: 0Figma folding
props: margin: type: object members: compact: type: string default: none enum: [none, small, large] expanded: type: string default: none enum: [none, small, large]Figma authors members as separator-delimited flat property names (margin.compact, margin.expanded), folded into one ObjectProp when conventions.platforms.figma.objectProps is declared. Each member’s $extensions['com.figma'].name records the flat source name, so unfolding back to Figma is reversal, not re-derivation. Configurations set an object prop with a member-keyed value — see Prop Configurations.
Platform bindings
Figma
Disposition: bound · Realised by: separator-delimited flat property names, under platforms.figma.objectProps“
Figma cannot author an object natively. Flat names fold into one ObjectProp before key formatting (ADR-111); each member’s $extensions['com.figma'].name records the flat source name, so unfolding on render is reversal, not re-derivation. A name colliding with the fold outcome stays flat. Render emits one flat property per member — BOOLEAN for boolean members, TEXT otherwise; enum members are variant axes and belong to the component set.
CSS
Disposition: bound · Realised by: Css
Rules: propsToSelectors — with boolean, enum, number
An object prop participates member-wise: each member is a scalar, flattened to a dotted arg key, and an enum member is a variant axis selecting exactly as a top-level enum does.
React
Disposition: bound · Realised by: a named member interface; values as object literals
The contract spells the object shape as its own interface (ADR-111). Stories and controls work on the flat view — each member under a dotted arg key (margin.compact) — and reassemble the object at the call site. A member binding pointer (#/props/margin/members/compact) reads through member access on the host.
Web Components
Disposition: bound · Realised by: a named member interface; values as object literals
The contract spells the object shape as its own interface (ADR-111), from the same shared derivation as React. Stories and controls work on the flat dotted-arg-key view and reassemble the object in this emitter’s idiom.
Decisions
- ADR-015 — Resolve
AnyProponeOfschema violation betweenTextPropandIconProp - ADR-111 — Object-Typed Props
Rules
| Rule | Statement |
|---|---|
| DSPEC-13 | A member name must not begin with $ and must not contain the declared separator |
Source
| Format | File |
|---|---|
| JSON Schema | packages/schema/schema/component.schema.json |
| TypeScript | packages/schema/types/Props.ts |
| Specification | §4.2, §11 |