Types
This page summarizes the primary public types exported by@weaverse/hydrogen and @weaverse/schema.
Component Types
HydrogenComponent
A component definition registered with Weaverse. The default export can be a forwarded-ref component or a function component.
HydrogenComponentProps
HydrogenComponentSchema
HydrogenComponentSchema is the current public alias for SchemaType. The type itself is not deprecated; only inspector and enabledOn are deprecated.
createSchema() to type-check an object against SchemaType and enable development-time diagnostics:
createSchema() returns the original schema immediately. Outside production it asynchronously lazy-loads Zod and logs validation issues as warnings; validation and import failures do not throw through the call. Production builds skip this validation path.
HydrogenComponentData
Inspector Types
The public types retain “Inspector” in their names for compatibility, but new schemas should use thesettings property.
InspectorGroup
BasicInput
HeadingInput
Loader Types
ComponentLoaderArgs
RouteLoaderArgs
WeaverseRouteAppLoadContext includes the Hydrogen context and a weaverse: WeaverseClient property.
WeaverseLoaderData
Theme Types
HydrogenThemeSettings
HydrogenThemeSchema
media sets what the Media Manager gallery hides for every picker in the theme. It is a sibling of
settings rather than an entry inside it, because settings renders as merchant-editable controls and
these rules are meant to be fixed by the theme author. An image or video input can override them for
its own picker — see Filtering the Media Manager gallery.
Page Types
Component Availability
The canonical types are exported by@weaverse/schema and re-exported by @weaverse/hydrogen:
enabled for static or synchronous conditional availability:
enabledOn remains supported for backward compatibility but is deprecated. Avoid relying on undocumented behavior for thrown errors, promises, RPC serialization, or existing instances; these semantics are not part of the public SDK contract.
Internationalization
Usage Example
Type Extensions
A Hydrogen app can augment its load context and environment:Related
- WeaverseHydrogenRoot - Render Weaverse loader data
- WeaverseClient - Fetch Weaverse content