React bindings and SchemaRenderer component for Object UI.
- ⚛️ SchemaRenderer - Main component for rendering Object UI schemas
- 🪝 React Hooks - Hooks for accessing renderer context
- 🔄 Context Providers - React Context for state management
- 📦 Tree-Shakable - Import only what you need
npm install @object-ui/react @object-ui/corePeer Dependencies:
react^18.0.0 || ^19.0.0react-dom^18.0.0 || ^19.0.0
import { SchemaRenderer } from '@object-ui/react'
const schema = {
type: 'text',
value: 'Hello, Object UI!'
}
function App() {
return <SchemaRenderer schema={schema} />
}import { SchemaRenderer } from '@object-ui/react'
const schema = {
type: 'form',
body: [
{
type: 'input',
name: 'name',
label: 'Name',
value: '${user.name}'
}
]
}
const data = {
user: { name: 'John Doe' }
}
function App() {
return <SchemaRenderer schema={schema} data={data} />
}import { SchemaRenderer } from '@object-ui/react'
function App() {
const handleSubmit = (data) => {
console.log('Form submitted:', data)
}
return (
<SchemaRenderer
schema={formSchema}
onSubmit={handleSubmit}
/>
)
}Access the current schema context:
import { useSchemaContext } from '@object-ui/react'
function MyComponent() {
const { data, updateData } = useSchemaContext()
return <div>{data.value}</div>
}Access the component registry:
import { useRegistry } from '@object-ui/react'
function MyComponent() {
const registry = useRegistry()
const Component = registry.get('button')
return <Component {...props} />
}See full documentation for detailed API reference.
MIT