Skip to main content
Public component schema authoring contract. WeaverseComponentSchema is an alias of this type. Only inspector (use settings) and enabledOn (use enabled) are deprecated. enabled controls insertion availability only: a type listed in another component’s childTypes appears in the root Add Section picker only when its enabledOn.groups contains 'body' or '*', so keep that field on components used both as a section and as a child.

Properties

string[]
Component types allowed as direct children.
Resolvable<boolean, ComponentAvailabilityContext>
Whether the component can be inserted in the current page context.
{ groups: "*" | ComponentGroup[]; pages: PageType[] }
Type: PageTypeLegacy page and placement availability restrictions.
Deprecated: Use enabled for both static and context-aware availability. Existing schemas remain supported, and both rules must pass when both properties are present.
InspectorGroup[]
Type: InspectorGroupLegacy setting groups shown in Studio.
Deprecated: Use settings instead.
number
Maximum number of instances allowed under the same parent.
{ children: ComponentPresets[] }
Initial component data and optional child presets.
InspectorGroup[]
Type: InspectorGroupSetting groups shown in the Studio inspector.
string
required
Short component title displayed in Studio.
string
required
Stable kebab-case component identifier.

Methods

label()

Synchronous callback deriving a plain-text label for one instance from its settings. Declaration only: the SDK never calls it; the Studio preview bridge evaluates it and falls back to title.

Parameters

Record<string, any>
required

Returns

string | null | undefined