This guide helps you migrate from @openzeppelin/ui-builder-* packages to the new @openzeppelin/ui-* namespace.
The OpenZeppelin UI packages have been extracted from the UI Builder monorepo into a standalone repository with a cleaner namespace. The packages retain full API compatibility, so migration only requires updating import paths and dependencies.
| Old Package Name | New Package Name |
|---|---|
@openzeppelin/ui-builder-types |
@openzeppelin/ui-types |
@openzeppelin/ui-builder-utils |
@openzeppelin/ui-utils |
@openzeppelin/ui-builder-styles |
@openzeppelin/ui-styles |
@openzeppelin/ui-builder-ui |
@openzeppelin/ui-components |
@openzeppelin/ui-builder-renderer |
@openzeppelin/ui-renderer |
@openzeppelin/ui-builder-react-core |
@openzeppelin/ui-react |
@openzeppelin/ui-builder-storage |
@openzeppelin/ui-storage |
Remove old packages and install new ones:
# Remove old packages
pnpm remove @openzeppelin/ui-builder-types @openzeppelin/ui-builder-utils @openzeppelin/ui-builder-styles @openzeppelin/ui-builder-ui @openzeppelin/ui-builder-renderer @openzeppelin/ui-builder-react-core @openzeppelin/ui-builder-storage
# Install new packages (only the ones you need)
pnpm add @openzeppelin/ui-types @openzeppelin/ui-utils @openzeppelin/ui-styles @openzeppelin/ui-components @openzeppelin/ui-renderer @openzeppelin/ui-react @openzeppelin/ui-storageOr update your package.json manually:
{
"dependencies": {
- "@openzeppelin/ui-builder-types": "^0.x.x",
- "@openzeppelin/ui-builder-utils": "^0.x.x",
- "@openzeppelin/ui-builder-styles": "^0.x.x",
- "@openzeppelin/ui-builder-ui": "^0.x.x",
- "@openzeppelin/ui-builder-renderer": "^0.x.x",
- "@openzeppelin/ui-builder-react-core": "^0.x.x",
- "@openzeppelin/ui-builder-storage": "^0.x.x"
+ "@openzeppelin/ui-types": "^1.0.0",
+ "@openzeppelin/ui-utils": "^1.0.0",
+ "@openzeppelin/ui-styles": "^1.0.0",
+ "@openzeppelin/ui-components": "^1.0.0",
+ "@openzeppelin/ui-renderer": "^1.0.0",
+ "@openzeppelin/ui-react": "^1.0.0",
+ "@openzeppelin/ui-storage": "^1.0.0"
}
}Then run:
pnpm installUse find-and-replace to update all imports in your codebase.
# Types
find . -type f \( -name "*.ts" -o -name "*.tsx" -o -name "*.js" -o -name "*.jsx" \) \
-not -path "./node_modules/*" \
-exec sed -i '' 's/@openzeppelin\/ui-builder-types/@openzeppelin\/ui-types/g' {} +
# Utils
find . -type f \( -name "*.ts" -o -name "*.tsx" -o -name "*.js" -o -name "*.jsx" \) \
-not -path "./node_modules/*" \
-exec sed -i '' 's/@openzeppelin\/ui-builder-utils/@openzeppelin\/ui-utils/g' {} +
# Styles
find . -type f \( -name "*.ts" -o -name "*.tsx" -o -name "*.js" -o -name "*.jsx" -o -name "*.css" \) \
-not -path "./node_modules/*" \
-exec sed -i '' 's/@openzeppelin\/ui-builder-styles/@openzeppelin\/ui-styles/g' {} +
# UI Components (note: package renamed from ui-builder-ui to ui-components)
find . -type f \( -name "*.ts" -o -name "*.tsx" -o -name "*.js" -o -name "*.jsx" \) \
-not -path "./node_modules/*" \
-exec sed -i '' 's/@openzeppelin\/ui-builder-ui/@openzeppelin\/ui-components/g' {} +
# Renderer
find . -type f \( -name "*.ts" -o -name "*.tsx" -o -name "*.js" -o -name "*.jsx" \) \
-not -path "./node_modules/*" \
-exec sed -i '' 's/@openzeppelin\/ui-builder-renderer/@openzeppelin\/ui-renderer/g' {} +
# React Core (note: package renamed from ui-builder-react-core to ui-react)
find . -type f \( -name "*.ts" -o -name "*.tsx" -o -name "*.js" -o -name "*.jsx" \) \
-not -path "./node_modules/*" \
-exec sed -i '' 's/@openzeppelin\/ui-builder-react-core/@openzeppelin\/ui-react/g' {} +
# Storage
find . -type f \( -name "*.ts" -o -name "*.tsx" -o -name "*.js" -o -name "*.jsx" \) \
-not -path "./node_modules/*" \
-exec sed -i '' 's/@openzeppelin\/ui-builder-storage/@openzeppelin\/ui-storage/g' {} +On Linux systems, the -i flag works differently. Use:
# Types
find . -type f \( -name "*.ts" -o -name "*.tsx" -o -name "*.js" -o -name "*.jsx" \) \
-not -path "./node_modules/*" \
-exec sed -i 's/@openzeppelin\/ui-builder-types/@openzeppelin\/ui-types/g' {} +
# (repeat for other packages with same pattern change: -i '' → -i)For faster processing on large codebases:
# Types
rg -l '@openzeppelin/ui-builder-types' --glob '*.{ts,tsx,js,jsx}' | xargs sed -i '' 's/@openzeppelin\/ui-builder-types/@openzeppelin\/ui-types/g'
# Utils
rg -l '@openzeppelin/ui-builder-utils' --glob '*.{ts,tsx,js,jsx}' | xargs sed -i '' 's/@openzeppelin\/ui-builder-utils/@openzeppelin\/ui-utils/g'
# Styles
rg -l '@openzeppelin/ui-builder-styles' --glob '*.{ts,tsx,js,jsx,css}' | xargs sed -i '' 's/@openzeppelin\/ui-builder-styles/@openzeppelin\/ui-styles/g'
# UI Components
rg -l '@openzeppelin/ui-builder-ui' --glob '*.{ts,tsx,js,jsx}' | xargs sed -i '' 's/@openzeppelin\/ui-builder-ui/@openzeppelin\/ui-components/g'
# Renderer
rg -l '@openzeppelin/ui-builder-renderer' --glob '*.{ts,tsx,js,jsx}' | xargs sed -i '' 's/@openzeppelin\/ui-builder-renderer/@openzeppelin\/ui-renderer/g'
# React Core
rg -l '@openzeppelin/ui-builder-react-core' --glob '*.{ts,tsx,js,jsx}' | xargs sed -i '' 's/@openzeppelin\/ui-builder-react-core/@openzeppelin\/ui-react/g'
# Storage
rg -l '@openzeppelin/ui-builder-storage' --glob '*.{ts,tsx,js,jsx}' | xargs sed -i '' 's/@openzeppelin\/ui-builder-storage/@openzeppelin\/ui-storage/g'- Open Find and Replace (
Cmd+Shift+H/Ctrl+Shift+H) - Enable Regex mode (click
.*) - Set Files to include:
*.ts, *.tsx, *.js, *.jsx, *.css - Set Files to exclude:
node_modules - Search and replace each pattern:
| Find | Replace |
|---|---|
@openzeppelin/ui-builder-types |
@openzeppelin/ui-types |
@openzeppelin/ui-builder-utils |
@openzeppelin/ui-utils |
@openzeppelin/ui-builder-styles |
@openzeppelin/ui-styles |
@openzeppelin/ui-builder-ui |
@openzeppelin/ui-components |
@openzeppelin/ui-builder-renderer |
@openzeppelin/ui-renderer |
@openzeppelin/ui-builder-react-core |
@openzeppelin/ui-react |
@openzeppelin/ui-builder-storage |
@openzeppelin/ui-storage |
After updating imports, verify your project builds correctly:
pnpm buildEnsure all tests pass:
pnpm testFor convenience, you can use this shell script to perform all replacements:
#!/bin/bash
# migrate-ui-packages.sh
# Run from your project root directory
set -e
echo "Migrating @openzeppelin/ui-builder-* to @openzeppelin/ui-*..."
# Define replacements
declare -A REPLACEMENTS=(
["@openzeppelin/ui-builder-types"]="@openzeppelin/ui-types"
["@openzeppelin/ui-builder-utils"]="@openzeppelin/ui-utils"
["@openzeppelin/ui-builder-styles"]="@openzeppelin/ui-styles"
["@openzeppelin/ui-builder-ui"]="@openzeppelin/ui-components"
["@openzeppelin/ui-builder-renderer"]="@openzeppelin/ui-renderer"
["@openzeppelin/ui-builder-react-core"]="@openzeppelin/ui-react"
["@openzeppelin/ui-builder-storage"]="@openzeppelin/ui-storage"
)
# Detect sed variant (BSD vs GNU)
if sed --version 2>/dev/null | grep -q GNU; then
SED_INPLACE="sed -i"
else
SED_INPLACE="sed -i ''"
fi
# Perform replacements
for old in "${!REPLACEMENTS[@]}"; do
new="${REPLACEMENTS[$old]}"
echo " $old → $new"
find . -type f \( -name "*.ts" -o -name "*.tsx" -o -name "*.js" -o -name "*.jsx" -o -name "*.css" -o -name "*.json" \) \
-not -path "./node_modules/*" \
-not -path "./.git/*" \
-exec $SED_INPLACE "s|$old|$new|g" {} + 2>/dev/null || true
done
echo "Migration complete! Run 'pnpm install && pnpm build' to verify."Save this as migrate-ui-packages.sh, make it executable (chmod +x migrate-ui-packages.sh), and run it from your project root.
Error:
Cannot find module '@openzeppelin/ui-types' or its corresponding type declarations.
Solutions:
- Ensure you've installed the new packages:
pnpm add @openzeppelin/ui-types - Delete
node_modulesand reinstall:rm -rf node_modules && pnpm install - Clear TypeScript cache:
rm -rf node_modules/.cache && pnpm typecheck - Restart your IDE/editor to pick up new type definitions
Error:
ERR_PNPM_PEER_DEP_ISSUES Unmet peer dependencies
Solutions:
- Ensure you have React 19 installed:
pnpm add react@^19.0.0 react-dom@^19.0.0 - Check that you don't have both old and new packages installed
- Review the peer dependency requirements in each package's README
Error:
Duplicate identifier errors or conflicting type definitions
Solutions:
- Remove all old packages completely:
pnpm remove @openzeppelin/ui-builder-types @openzeppelin/ui-builder-utils @openzeppelin/ui-builder-styles @openzeppelin/ui-builder-ui @openzeppelin/ui-builder-renderer @openzeppelin/ui-builder-react-core @openzeppelin/ui-builder-storage
- Check your lockfile for any remaining references to old packages
- Delete lockfile and reinstall:
rm pnpm-lock.yaml && pnpm install
Error:
Styles not applying correctly after migration
Solutions:
- Update your CSS imports:
- @import '@openzeppelin/ui-builder-styles/global.css'; + @import '@openzeppelin/ui-styles/global.css';
- Ensure Tailwind CSS 4 is properly configured
- Clear any CSS caches or rebuild your styles
Error:
Cannot resolve workspace:^ protocol
Solutions:
- If migrating within a monorepo, ensure you're using npm versions instead of workspace protocol:
- "@openzeppelin/ui-types": "workspace:^" + "@openzeppelin/ui-types": "^1.0.0"
- Run
pnpm installafter updating package.json
Error:
Type errors or runtime errors due to incompatible package versions
Solutions:
- Ensure all
@openzeppelin/ui-*packages are on compatible versions:pnpm why @openzeppelin/ui-types
- Update all packages to the latest version:
pnpm update @openzeppelin/ui-types @openzeppelin/ui-utils @openzeppelin/ui-styles @openzeppelin/ui-components @openzeppelin/ui-renderer @openzeppelin/ui-react @openzeppelin/ui-storage
Error:
Some imports still reference old package names
Solutions:
- Check for imports in less common file types (
.mjs,.cjs,.mts,.cts) - Check configuration files like
jest.config.js,vite.config.ts - Search your entire project:
grep -r "ui-builder-" --include="*.ts" --include="*.tsx" --include="*.js" --include="*.json"
All packages maintain full API compatibility. There are no breaking changes to:
- Function signatures
- Type definitions
- Component props
- Hook interfaces
- Exported constants
The only change is the package namespace from @openzeppelin/ui-builder-* to @openzeppelin/ui-*.
If you encounter issues not covered in this guide:
- Check the package-specific README files for additional documentation
- Review the example app for working implementation patterns
- Open an issue on the GitHub repository
import { useUIBuilder } from '@openzeppelin/ui-builder-react-core';
import { TransactionForm } from '@openzeppelin/ui-builder-renderer';
import { createStorage } from '@openzeppelin/ui-builder-storage';
import type { ContractSchema } from '@openzeppelin/ui-builder-types';
import { Button } from '@openzeppelin/ui-builder-ui';
import { cn } from '@openzeppelin/ui-builder-utils';import { Button } from '@openzeppelin/ui-components';
import { useUIBuilder } from '@openzeppelin/ui-react';
import { TransactionForm } from '@openzeppelin/ui-renderer';
import { createStorage } from '@openzeppelin/ui-storage';
import type { ContractSchema } from '@openzeppelin/ui-types';
import { cn } from '@openzeppelin/ui-utils';