> ## Documentation Index
> Fetch the complete documentation index at: https://weaverse.io/docs/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> Weaverse component configuration uses `settings`. `inspector` is deprecated; never generate it.
> Weaverse Hydrogen themes use React Router v7: import from `react-router`, never `react-router-dom` or `@remix-run/*`.
> Before using any code sample, read `@weaverse/hydrogen` in the project's `package.json`: 6.x and 5.x import from different entries and use different type names, so code for one does not build on the other.
> `@weaverse/hydrogen` 6 (Shopify Hydrogen 2026.10 and later, the version these docs show) imports from `@weaverse/hydrogen/react-router` and uses `Weaverse*` types such as `WeaverseComponentProps`, `WeaverseComponentLoaderArgs` and `WeaverseComponentSchema`; the root `@weaverse/hydrogen` entry only exports `createSchema()`, data helpers and types.
> `@weaverse/hydrogen` 5.x (Hydrogen 2026.4 and earlier) imports everything from `@weaverse/hydrogen` and uses `HydrogenComponentProps`, `ComponentLoaderArgs` and `HydrogenComponentSchema`. On a 5.x project, convert samples to these names. Upgrade to 6 only when asked (`npx @weaverse/cli@latest migrate v6`, plus the Hydrogen 2026.10 upgrade). Do not mix major versions.
> Next.js themes use `@weaverse/hydrogen` 6.2.0 or later: import client and shared code from `@weaverse/hydrogen/next` and server-only code from `@weaverse/hydrogen/next/server`. `@weaverse/next` is deprecated; never install or import it.
> For live project data (pages, theme settings, translations), use the Weaverse MCP server: https://weaverse.io/docs/developer-tools/weaverse-mcp

# SchemaType

> Public component schema authoring contract.

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.

```ts
export let schema = createSchema({
  type: 'product-details',
  title: 'Product details',
  settings: [
    {
      group: 'Content',
      inputs: [{ type: 'switch', name: 'showPrice', label: 'Show price' }],
    },
  ],
  enabled: ({ page, group }) => page.type === 'PRODUCT' && group === 'body',
})
```

## Properties

**childTypes** `string[]`

Component types allowed as direct children.

**enabled** `Resolvable\<boolean, ComponentAvailabilityContext\>`

Whether the component can be inserted in the current page context.

**enabledOn** `\{ groups: "*" | ComponentGroup[]; pages: PageType[] \}`

**Type:** `{ groups: "*" | ComponentGroup[]; pages: PageType[] }`

Legacy page and placement availability restrictions.

> [!WARNING]
>
> Deprecated: Use `enabled` for both static and context-aware availability.
> Existing schemas remain supported, and both rules must pass when both
> properties are present.

**inspector** `InspectorGroup[]`

**Type:** `InspectorGroup[]`

Legacy setting groups shown in Studio.

> [!WARNING]
>
> Deprecated: Use `settings` instead.

**limit** `number`

Maximum number of instances allowed under the same parent.

**presets** `\{ children: ComponentPresets[] \}`

Initial component data and optional child presets.

**settings** `InspectorGroup[]`

**Type:** `InspectorGroup[]`

Setting groups shown in the Studio inspector.

**title** `string` *required*

Short component title displayed in Studio.

**type** `string` *required*

Stable kebab-case component identifier.

## Methods

### label()

```typescript
label(data: Record<string, any>): string | null | undefined
```

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`.

```ts
label: (data: HeadingProps) => data.content
```

#### Parameters

**data** `Record\<string, any\>` *required*

#### Returns

`string | null | undefined`


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.