Package Overview
@weaverse/core
This foundational package contains the core logic of Weaverse and Weaverse Items, focusing on essential operations and
data handling within the Weaverse ecosystem.
Key Features:
- Data model definitions for Weaverse components
- Core rendering logic
- State management utilities
- Type definitions shared across the ecosystem
@weaverse/react
Specializing in the user interface, this package provides React bindings for Weaverse, managing the rendering of Weaverse Items as React components and ensuring proper display and interaction within themes.
Key Features:
- React component rendering system for Weaverse items
- Context providers for Weaverse and item states
- Custom hooks for accessing Weaverse data and item instances
- Utility functions for CSS generation and class name handling
WeaverseRoot: The main component that renders your Weaverse content treeWeaverseContextProvider: Provides the Weaverse context to all child componentsItemComponent: Renders individual Weaverse items based on their type and properties
useWeaverse(): Access the Weaverse instance from any componentuseItemInstance(id?): Get a specific item instance by ID or the current itemuseParentInstance(): Get the parent item of the current componentuseChildInstances(id?): Get all child instances of an item
registerElement keys the registry by type and ignores a re-registration of
a type that already exists, so register each element type once.@weaverse/hydrogen
Tailored for theme development, this package carries the logic required to build a Hydrogen Theme and facilitate its
integration with Weaverse Studio’s customization features.
Key Features:
- Shopify Hydrogen integration
- Theme customization components
- Studio preview capabilities
- Hydrogen-specific renderers and utilities
WeaverseHydrogenRoot takes no children — it renders the Weaverse page resolved
for the current React Router route. Its props are:
@weaverse/cli
The command-line scaffolding tool for creating a Weaverse Hydrogen project from a supported template.
Key Features:
- Project scaffolding with templates
- Non-interactive project configuration through CLI flags
- Dependency installation and optional development-server startup
@weaverse/biome
A package that provides standardized Biome configuration for Weaverse projects, ensuring consistent code formatting and linting across all Weaverse-related codebases.
Key Features:
- Preconfigured Biome settings optimized for Weaverse development
- Consistent code style enforcement
- Standardized linting rules with appropriate severity levels
- Compatible with React and TypeScript projects
biome.json file to extend the Weaverse configuration:
-
JavaScript/TypeScript formatting:
- Uses single quotes
- Employs spaces for indentation
- Semicolons only as needed
-
Linting rules with sensible defaults:
- Accessibility (a11y) checks
- React-specific best practices
- Security protections
- Code complexity guidance
Package Compatibility
The Weaverse SDK packages are designed to work together seamlessly, but each can also be used independently based on your project needs:System Requirements
Requirements differ per package — check the table above for the exact package you install. For the@weaverse/hydrogen package:
- Node.js: v20.0.0 or higher
- React / React DOM: v19.0.0 or higher
- React Router: v7 (not React Router DOM)
- Shopify Hydrogen: 2025.5 or higher
- npm: v7.0.0 or higher (or equivalent package manager)
A generated theme may require a newer Node.js version than the SDK package.
The current Pilot template declares Node.js
>=22.12.0.