This guide covers everything you need to install and configure Object UI in your project.
Before installing Object UI, ensure you have:
- Node.js 18.0 or higher
- React 18.0 or higher
- A package manager: npm, yarn, or pnpm
Object UI is distributed as several packages:
| Package | Description | Required |
|---|---|---|
@object-ui/core |
Core logic, types, and validation (Zero React dependencies) | Yes |
@object-ui/react |
React bindings and SchemaRenderer component | Yes |
@object-ui/components |
Standard UI library with Shadcn + Tailwind components | Yes |
@object-ui/designer |
Visual schema editor and builder | Optional |
To get started, install the core packages:
::: code-group
npm install @object-ui/react @object-ui/componentspnpm add @object-ui/react @object-ui/componentsyarn add @object-ui/react @object-ui/components:::
First, install the required packages as shown above.
Object UI requires these peer dependencies:
npm install react@^18.0.0 react-dom@^18.0.0Object UI uses Tailwind CSS for styling. Add to your tailwind.config.js:
/** @type {import('tailwindcss').Config} */
module.exports = {
content: [
'./src/**/*.{js,jsx,ts,tsx}',
'./node_modules/@object-ui/components/**/*.{js,ts,jsx,tsx}'
],
theme: {
extend: {},
},
plugins: [],
}Import Tailwind and Object UI styles in your main CSS file:
/* src/index.css */
@tailwind base;
@tailwind components;
@tailwind utilities;
@import '@object-ui/components/dist/style.css';Register the default components in your app entry point:
// src/main.tsx
import { registerDefaultRenderers } from '@object-ui/components'
registerDefaultRenderers()If you're using TypeScript, Object UI provides full type definitions:
{
"compilerOptions": {
"types": ["@object-ui/react", "@object-ui/components"]
}
}For Next.js 13+ with App Router:
// app/providers.tsx
'use client'
import { useEffect } from 'react'
import { registerDefaultRenderers } from '@object-ui/components'
export function Providers({ children }) {
useEffect(() => {
registerDefaultRenderers()
}, [])
return <>{children}</>
}Vite works out of the box. Just ensure you have the Tailwind config.
Create React App requires no special configuration.
For TypeScript type definitions:
npm install @object-ui/coreimport type { PageSchema, FormSchema } from '@object-ui/core'For visual schema editing:
npm install @object-ui/designerVerify your installation with this test:
import { SchemaRenderer } from '@object-ui/react'
const testSchema = {
type: "text",
value: "Hello from Object UI!"
}
function App() {
return <SchemaRenderer schema={testSchema} />
}If you see "Hello from Object UI!" rendered, you're all set! ✅
Make sure you:
- Added Object UI to Tailwind content paths
- Imported the CSS file
- Imported Tailwind directives
Check that you:
- Called
registerDefaultRenderers() - Installed all peer dependencies
- Used the correct schema format
Ensure you:
- Installed type packages
- Added types to
tsconfig.json - Updated TypeScript to version 5.0+
For contributing or local development:
# Clone the repository
git clone https://github.com/objectql/objectui.git
cd objectui
# Install dependencies
pnpm install
# Start development
pnpm dev- Quick Start - Build your first app
- Schema Rendering - Learn core concepts
- Component Registry - Understand components
Having trouble? We're here to help: