| title | Schema Overview |
|---|---|
| description | Comprehensive overview of ObjectUI schemas for building enterprise applications |
ObjectUI provides powerful schemas that enable you to build sophisticated enterprise applications with advanced features like theming, reporting, and complex workflows. This guide provides an overview of all available schemas and helps you get started quickly.
ObjectUI includes enterprise-grade capabilities to build production-ready applications:
- Application Structure - Define complete multi-page applications with navigation
- Dynamic Theming - Brand your applications with custom themes and light/dark modes
- Advanced Actions - Build complex workflows with API calls, chaining, and conditions
- Enterprise Reporting - Generate, schedule, and export comprehensive reports
Define your entire application structure with navigation, branding, and global settings.
const app: AppComponentSchema = {
type: 'app',
title: 'My Application',
layout: 'sidebar',
menu: [...],
navigation: [...]
};Use Cases:
- Multi-page applications
- Admin dashboards
- CRM systems
- Internal tools
Dynamic theming with light/dark modes, color palettes, and typography.
Theming is not a component you declare in a page. There is no type: 'theme'
node: the ThemeComponentSchema wrapper documented here until objectui#5489 was
retired because no renderer ever implemented it, so a page declaring one got the
registry's "Unknown component type" panel rather than a theme manager.
A theme is a document, not a node. Author it as the Theme shape
@object-ui/types re-exports from @objectstack/spec/ui, hand it to
ThemeProvider (@object-ui/react), and ThemeEngine (@object-ui/core)
turns it into the CSS variables your components already read.
What the theme document carries:
- Light/dark mode switching
- 20+ semantic colors
- Typography system
- CSS variables
- Tailwind integration
Powerful action system with AJAX calls, chaining, conditions, and tracking.
const action: ActionSchema = {
type: 'action',
actionType: 'ajax',
api: '/api/submit',
chain: [...],
condition: '${...}',
tracking: {...}
};New Action Types:
ajax- API calls with full request configurationconfirm- Confirmation dialogsdialog- Modal/dialog actions
Key Features:
- Action chaining (sequential/parallel)
- Conditional execution (a
conditionpredicate gates whether an action runs) - Success / failure notices (
successMessage/errorMessage) - Event tracking
- Retry logic
Enterprise reports with aggregation, export, and scheduling.
import type { ReportComponentSchema } from '@object-ui/types';
const report: ReportComponentSchema = {
type: 'report',
title: 'Sales Report',
fields: [
{ name: 'revenue', aggregation: 'sum' },
{ name: 'orders', aggregation: 'count' }
],
schedule: {
frequency: 'monthly',
recipients: ['team@company.com']
}
};Features:
- Field aggregation (sum, avg, count, min, max)
- Multiple export formats (PDF, Excel, CSV)
- Scheduled reports
- Email distribution
- Interactive builder
| Schema | Purpose | Best For |
|---|---|---|
| AppComponentSchema | Application structure | Multi-page apps, dashboards |
| Enhanced Actions | Complex workflows | API integration, multi-step processes |
| ReportComponentSchema | Data reporting | Analytics, business intelligence |
ObjectUI also includes enhanced view components:
Rich detail pages with sections, tabs, and related records.
Toggle between list, grid, kanban, calendar, timeline, and map views.
Advanced filtering interface with multiple field types.
Sort configuration with multiple fields.
All schemas are included in @object-ui/types. Install it in your project:
npm install @object-ui/types
# or
pnpm add @object-ui/types
# or
yarn add @object-ui/typesImport the type definitions you need:
import type {
AppComponentSchema,
ActionSchema,
ReportComponentSchema
} from '@object-ui/types';For runtime validation, use the included Zod schemas:
import {
AppComponentSchema,
CRUDActionSchema,
ReportComponentSchema
} from '@object-ui/types/zod';
const myConfig = { type: 'app', title: 'My Application', layout: 'sidebar' };
const result = AppComponentSchema.safeParse(myConfig);
if (result.success) {
// Valid configuration
const app = result.data;
} else {
// Handle validation errors
console.error(result.error);
}Here's a complete example showing how to build a simple CRM application using ObjectUI schemas:
import type { AppComponentSchema } from '@object-ui/types';
// Define your application structure
const app: AppComponentSchema = {
type: 'app',
name: 'enterprise-crm',
title: 'Enterprise CRM',
layout: 'sidebar',
menu: [
{
type: 'item',
label: 'Dashboard',
icon: 'LayoutDashboard',
path: '/dashboard'
},
{
type: 'group',
label: 'Sales',
children: [
{ type: 'item', label: 'Leads', path: '/leads' },
{ type: 'item', label: 'Deals', path: '/deals' }
]
}
]
};This creates a professional-looking CRM application with:
- A sidebar layout with navigation menu
- Sales section with leads and deals
Theming is configured separately, as a theme document handed to ThemeProvider —
see Theme Schema.
ObjectUI provides advanced schemas and capabilities for enterprise applications:
ObjectUI includes these top-level schemas:
AppComponentSchema- Define your entire application structureReportComponentSchema- Create data reports with aggregation
The ActionSchema provides comprehensive action handling:
- ✅ Action types:
ajax,confirm,dialog - ✅ Action chaining via the
chainarray (sequential or parallel) - ✅ Conditional execution with the
conditionproperty - ❌ Success/failure callbacks:
onSuccess/onFailurewere RETIRED (objectui#7068) — both faces refuse them; writesuccessMessage/errorMessagefor notices, and the spec'sonSuccessblock{ navigate, openIn }onUIActionSchemafor post-success navigation (objectui#5934) - ✅ Event tracking with the
trackingconfiguration - ✅ Automatic retry logic
ObjectUI includes enhanced view components:
DetailViewSchema- Rich detail pages with sections and tabsViewSwitcherSchema- Toggle between list, grid, kanban, calendar viewsFilterUISchema- Advanced filtering interfaceSortUISchema- Multi-field sort configuration
-
Install package - Add
@object-ui/typesto your projectnpm install @object-ui/types@latest
-
Configure application - Define your app structure with AppComponentSchema (optional)
-
Set up theming - Hand a
Themedocument toThemeProviderfor consistent styling (optional) -
Implement actions - Use advanced action features like
confirmand chaining -
Test your application - Verify all functionality works as expected
- Schema Type Reference - Complete schema reference with JSON examples.
- Quick Start - Render your first ObjectUI schema.
- Schema Rendering - Understand the renderer pipeline.
- Component Registry - Learn how schema
typevalues resolve to components.
- GitHub Issues - Report bugs and request features
- Documentation Site - Full documentation and guides
- Schema Reference - Detailed schema documentation
Ready to build with ObjectUI? Here's what to do next:
- Review schema documentation - Learn about each schema in detail
- Try the Quick Start - Build your first ObjectUI application
- Explore components - See the core renderer catalog
- Explore plugins - Add heavier widgets such as grids, kanban, charts, maps, and reports