> ## 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

# createSchema

```typescript
createSchema(schema: SchemaType): SchemaType
```

Create a section schema.

Validation runs in development only: the validation runtime (zod) is imported
lazily inside a `process.env.NODE_ENV !== 'production'` guard, which the
consuming bundler statically evaluates and eliminates in production builds —
both the browser bundle and the Oxygen/SSR worker. Production storefronts
therefore ship section schemas with zero validation overhead and no zod.

Returns the original schema immediately. Outside production, validation
issues are logged as `console.warn` warnings; validation and import failures
never throw through the call.

```tsx
import { createSchema, IMAGES_PLACEHOLDERS } from '@weaverse/hydrogen/react-router' // or '@weaverse/hydrogen/next'

export let schema = createSchema({
  type: 'hero-banner',
  title: 'Hero Banner',
  settings: [
    {
      group: 'Content',
      inputs: [
        {
          type: 'text',
          name: 'heading',
          label: 'Heading',
          defaultValue: 'Welcome to our store',
        },
        {
          type: 'image',
          name: 'image',
          label: 'Image',
          defaultValue: IMAGES_PLACEHOLDERS.banner_1,
        },
      ],
    },
  ],
})
```

## Parameters

**schema** `SchemaType` *required*

## Returns

`SchemaType`


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