ObjectUIObjectUI

Schema Type Reference

Complete API reference for all ObjectUI schema types with annotated examples

Schema Type Reference

This reference documents every ObjectUI schema type with annotated JSON examples. Each schema extends BaseSchema and can be rendered by the ObjectUI engine from pure JSON.

Import: All types are available from @object-ui/types.

import type { PageSchema, FormSchema, TableSchema, /* ... */ } from '@object-ui/types';

Base Schema

SchemaNode

The foundational building block of ObjectUI. Every component in the system is described by a SchemaNode. It can be a full schema object, or a primitive value rendered as text.

// Type definition
type SchemaNode = BaseSchema | string | number | boolean | null | undefined;

BaseSchema

All schema types extend BaseSchema. These shared properties are available on every component.

{
  "type": "div",
  "id": "my-component",
  "name": "wrapper",
  "label": "Wrapper",
  "description": "A container element",
  "className": "p-4 bg-white rounded-lg",
  "visible": true,
  "visibleOn": "${data.showWrapper}",
  "disabled": false,
  "disabledOn": "${data.isLocked}",
  "testId": "wrapper-element",
  "ariaLabel": "Content wrapper",
  "body": []
}
PropertyTypeDescription
typestringRequired. Component type identifier (e.g. "page", "form", "table").
idstringUnique instance identifier.
namestringComponent name, used for form fields and data binding.
labelstringHuman-readable display label.
descriptionstringHelp text or tooltip content.
classNamestringTailwind CSS utility classes.
styleRecord<string, string | number>Inline styles (prefer className).
bodySchemaNode | SchemaNode[]Child components rendered inside this component.
childrenSchemaNode | SchemaNode[]Alias for body.
visible / visibleOnboolean / stringControl visibility. visibleOn accepts expression strings.
hidden / hiddenOnboolean / stringInverse of visible.
disabled / disabledOnboolean / stringControl disabled state.
testIdstringTest identifier for automated testing.
ariaLabelstringAccessibility label.

Layout Schemas

PageSchema

Top-level page container. Defines a full page with optional regions (header, sidebar, footer).

{
  "type": "page",
  "title": "User Dashboard",
  "icon": "LayoutDashboard",
  "description": "Overview of user activity",
  "pageType": "detail",
  "object": "User",
  "variables": [
    { "name": "userId", "type": "string", "defaultValue": "current" }
  ],
  "regions": [
    {
      "name": "header",
      "body": [{ "type": "text", "body": "Welcome back" }]
    }
  ],
  "body": [
    { "type": "card", "title": "Activity", "body": [] }
  ]
}
PropertyTypeDescription
titlestringPage title displayed in the header.
iconstringLucide icon name for the page.
pageTypePageTypePage purpose: "list", "detail", "form", "dashboard", "report", "custom".
objectstringObjectQL object name this page operates on.
templatestringTemplate name for page layout.
variablesPageVariable[]Page-level variables with types and defaults.
regionsPageRegion[]Named layout regions (header, sidebar, footer).
bodySchemaNode[]Main page content.
isDefaultbooleanWhether this is the default page for the object.
assignedProfilesstring[]Security profiles that can access this page.

Related: AppSchema, DivSchema, GridSchema


DivSchema

A generic container element. The simplest layout primitive.

{
  "type": "div",
  "className": "flex items-center gap-4 p-6",
  "children": [
    { "type": "text", "body": "Hello World" },
    { "type": "button", "label": "Click me" }
  ]
}
PropertyTypeDescription
childrenSchemaNode | SchemaNode[]Child elements to render inside the div.

Related: GridSchema, CardSchema


CardSchema

A styled container with optional header, body, and footer regions.

{
  "type": "card",
  "title": "Revenue Summary",
  "description": "Monthly revenue breakdown",
  "variant": "outline",
  "hoverable": true,
  "header": [
    { "type": "badge", "label": "Live", "variant": "success" }
  ],
  "body": [
    { "type": "statistic", "label": "Total Revenue", "value": "$12,400" }
  ],
  "footer": [
    { "type": "button", "label": "View Details", "variant": "ghost" }
  ]
}
PropertyTypeDescription
titlestringCard title text.
descriptionstringSubtitle / description text.
variant"default" | "outline" | "ghost"Visual style variant.
hoverablebooleanAdd hover elevation effect.
clickablebooleanMake the entire card a click target.
headerSchemaNode | SchemaNode[]Content rendered in the card header.
bodySchemaNode | SchemaNode[]Main card content.
footerSchemaNode | SchemaNode[]Content rendered in the card footer.

Related: DivSchema, GridSchema


GridSchema

A responsive grid layout. Columns can be a fixed number or responsive breakpoints.

{
  "type": "grid",
  "columns": { "sm": 1, "md": 2, "lg": 3 },
  "gap": 6,
  "children": [
    { "type": "card", "title": "Card 1", "body": [] },
    { "type": "card", "title": "Card 2", "body": [] },
    { "type": "card", "title": "Card 3", "body": [] }
  ]
}
PropertyTypeDescription
columnsnumber | Record<string, number>Number of columns, or responsive map (e.g. { sm: 1, md: 2, lg: 3 }).
gapnumberGap between grid items (Tailwind spacing scale).
childrenSchemaNode | SchemaNode[]Grid items.

Related: DivSchema, CardSchema, DashboardSchema


TabsSchema

A tabbed interface for organizing content into switchable panels.

{
  "type": "tabs",
  "defaultValue": "overview",
  "orientation": "horizontal",
  "items": [
    {
      "value": "overview",
      "label": "Overview",
      "icon": "Info",
      "content": { "type": "div", "body": [{ "type": "text", "body": "Overview content" }] }
    },
    {
      "value": "settings",
      "label": "Settings",
      "icon": "Settings",
      "content": { "type": "form", "fields": [] }
    }
  ]
}
PropertyTypeDescription
defaultValuestringInitially active tab value.
valuestringControlled active tab value.
orientation"horizontal" | "vertical"Tab bar orientation.
itemsTabItem[]Tab definitions, each with value, label, icon, content, and optional disabled.

Related: CardSchema, PageSchema


Form Schemas

FormSchema

A complete form with fields, validation, layout, and actions.

{
  "type": "form",
  "layout": "horizontal",
  "columns": 2,
  "validationMode": "onBlur",
  "submitLabel": "Save Changes",
  "showCancel": true,
  "cancelLabel": "Discard",
  "defaultValues": {
    "name": "",
    "email": "",
    "role": "viewer"
  },
  "fields": [
    { "name": "name", "label": "Full Name", "type": "text", "required": true },
    { "name": "email", "label": "Email", "type": "email", "required": true },
    { "name": "role", "label": "Role", "type": "select", "options": [
      { "label": "Admin", "value": "admin" },
      { "label": "Editor", "value": "editor" },
      { "label": "Viewer", "value": "viewer" }
    ]}
  ]
}
PropertyTypeDescription
fieldsFormField[]Field definitions for the form.
defaultValuesRecord<string, any>Initial form values.
layout"vertical" | "horizontal"Field label placement.
columnsnumberNumber of columns for field layout.
validationMode"onSubmit" | "onBlur" | "onChange" | "onTouched" | "all"When validation triggers.
submitLabelstringText for the submit button.
cancelLabelstringText for the cancel button.
showCancelbooleanWhether to show a cancel button.
showActionsbooleanWhether to show the action buttons row.
resetOnSubmitbooleanReset form after successful submit.
mode"edit" | "read" | "disabled"Form interaction mode.
actionsSchemaNode[]Custom action buttons to replace defaults.

Related: InputSchema, SelectSchema, ObjectFormSchema


InputSchema

A text input field supporting multiple input types with validation.

{
  "type": "input",
  "name": "email",
  "label": "Email Address",
  "inputType": "email",
  "placeholder": "you@example.com",
  "required": true,
  "description": "We'll never share your email",
  "maxLength": 255
}
PropertyTypeDescription
namestringField name for form data binding.
inputTypestringHTML input type: "text", "email", "password", "number", "tel", "url", "search", "date", "time", "datetime-local".
placeholderstringPlaceholder text.
requiredbooleanWhether the field is required.
readOnlybooleanRender as read-only.
errorstringError message to display.
min / maxnumberNumeric range constraints.
stepnumberStep increment for number inputs.
maxLengthnumberMaximum character length.
patternstringRegex pattern for validation.

Related: FormSchema, SelectSchema


SelectSchema

A dropdown select field with predefined options.

{
  "type": "select",
  "name": "priority",
  "label": "Priority",
  "placeholder": "Choose priority...",
  "required": true,
  "options": [
    { "label": "🔴 Critical", "value": "critical" },
    { "label": "🟠 High", "value": "high" },
    { "label": "🟡 Medium", "value": "medium" },
    { "label": "🟢 Low", "value": "low" }
  ],
  "defaultValue": "medium"
}
PropertyTypeDescription
namestringField name for form data binding.
optionsSelectOption[]Array of { label, value } objects.
placeholderstringPlaceholder text when no value selected.
requiredbooleanWhether selection is required.
defaultValuestringInitial selected value.
errorstringError message to display.

Related: FormSchema, InputSchema


ButtonSchema

An interactive button with variants, icons, and loading states.

{
  "type": "button",
  "label": "Deploy to Production",
  "variant": "default",
  "size": "lg",
  "icon": "Rocket",
  "iconPosition": "left",
  "loading": false,
  "buttonType": "submit"
}
PropertyTypeDescription
labelstringButton text.
variant"default" | "secondary" | "destructive" | "outline" | "ghost" | "link"Visual style.
size"default" | "sm" | "lg" | "icon"Button size.
iconstringLucide icon name.
iconPosition"left" | "right"Icon placement relative to label.
loadingbooleanShow loading spinner and disable interaction.
buttonType"button" | "submit" | "reset"HTML button type.

Related: ActionSchema, FormSchema


Data Display Schemas

TableSchema

A data table with columns, optional striping, and hover effects.

{
  "type": "table",
  "caption": "Recent Orders",
  "hoverable": true,
  "striped": true,
  "columns": [
    { "name": "id", "label": "#", "width": 60 },
    { "name": "customer", "label": "Customer" },
    { "name": "amount", "label": "Amount", "align": "right" },
    { "name": "status", "label": "Status" }
  ],
  "data": [
    { "id": 1, "customer": "Acme Corp", "amount": "$1,200", "status": "Paid" },
    { "id": 2, "customer": "Globex Inc", "amount": "$3,400", "status": "Pending" }
  ],
  "footer": { "type": "text", "body": "Showing 2 of 156 orders" }
}
PropertyTypeDescription
captionstringTable caption / title text.
columnsTableColumn[]Column definitions with name, label, width, align, sortable, render.
dataany[]Array of row data objects.
footerSchemaNode | stringFooter content below the table.
hoverablebooleanHighlight rows on hover.
stripedbooleanAlternate row background colors.

Related: CRUDSchema, ObjectGridSchema


ChartSchema

A chart visualization supporting multiple chart types.

{
  "type": "chart",
  "chartType": "bar",
  "title": "Monthly Revenue",
  "description": "Revenue by month for 2024",
  "height": 350,
  "showLegend": true,
  "showGrid": true,
  "animate": true,
  "categories": ["Jan", "Feb", "Mar", "Apr", "May", "Jun"],
  "series": [
    {
      "name": "Revenue",
      "data": [4200, 5100, 4800, 6200, 5800, 7100],
      "color": "#3b82f6"
    },
    {
      "name": "Expenses",
      "data": [3100, 3400, 3200, 3800, 3600, 4000],
      "color": "#ef4444"
    }
  ]
}
PropertyTypeDescription
chartTypeChartTypeRequired. "bar", "line", "area", "pie", "donut", "radar", "scatter", "heatmap".
titlestringChart title.
descriptionstringChart description / subtitle.
categoriesstring[]X-axis category labels.
seriesChartSeries[]Data series, each with name, data array, and optional color.
height / widthstring | numberChart dimensions.
showLegendbooleanDisplay the legend.
showGridbooleanDisplay grid lines.
animatebooleanEnable entry animations.
configRecord<string, any>Additional chart library configuration.

Related: DashboardSchema, CardSchema


TreeViewSchema

A hierarchical tree component for nested data with expand/collapse and selection.

{
  "type": "tree-view",
  "multiSelect": false,
  "showLines": true,
  "defaultExpandedIds": ["root", "src"],
  "data": [
    {
      "id": "root",
      "label": "project",
      "icon": "Folder",
      "children": [
        {
          "id": "src",
          "label": "src",
          "icon": "Folder",
          "children": [
            { "id": "app", "label": "App.tsx", "icon": "FileCode" },
            { "id": "index", "label": "index.ts", "icon": "FileCode" }
          ]
        },
        { "id": "readme", "label": "README.md", "icon": "FileText" }
      ]
    }
  ]
}
PropertyTypeDescription
dataTreeNode[]Required. Nested tree data. Each node has id, label, optional icon and children.
defaultExpandedIdsstring[]Node IDs expanded on initial render.
defaultSelectedIdsstring[]Node IDs selected on initial render.
expandedIdsstring[]Controlled expanded state.
selectedIdsstring[]Controlled selection state.
multiSelectbooleanAllow selecting multiple nodes.
showLinesbooleanShow tree connector lines.

Related: TableSchema


CRUD Schemas

CRUDSchema

A complete CRUD (Create, Read, Update, Delete) interface with table, toolbar, filters, pagination, and batch/row actions.

{
  "type": "crud",
  "title": "Products",
  "resource": "products",
  "api": "/api/products",
  "selectable": "multiple",
  "defaultSort": "name",
  "defaultSortOrder": "asc",
  "columns": [
    { "name": "name", "label": "Product Name", "sortable": true },
    { "name": "price", "label": "Price", "align": "right" },
    { "name": "stock", "label": "Stock", "sortable": true },
    { "name": "status", "label": "Status" }
  ],
  "fields": [
    { "name": "name", "label": "Product Name", "type": "text", "required": true },
    { "name": "price", "label": "Price", "type": "number", "required": true },
    { "name": "stock", "label": "Stock", "type": "number" },
    { "name": "status", "label": "Status", "type": "select", "options": [
      { "label": "Active", "value": "active" },
      { "label": "Draft", "value": "draft" }
    ]}
  ],
  "operations": {
    "create": true,
    "read": true,
    "update": true,
    "delete": true,
    "export": true
  },
  "toolbar": {
    "showSearch": true,
    "showFilters": true,
    "showExport": true,
    "actions": [
      { "type": "action", "label": "Add Product", "level": "primary", "icon": "Plus" }
    ]
  },
  "filters": [
    { "name": "status", "label": "Status", "type": "select", "options": [
      { "label": "Active", "value": "active" },
      { "label": "Draft", "value": "draft" }
    ]}
  ],
  "pagination": {
    "pageSize": 20,
    "pageSizeOptions": [10, 20, 50, 100]
  },
  "rowActions": [
    { "type": "action", "label": "Edit", "icon": "Pencil", "actionType": "dialog" },
    { "type": "action", "label": "Delete", "icon": "Trash2", "level": "danger", "actionType": "confirm" }
  ],
  "batchActions": [
    { "type": "action", "label": "Delete Selected", "level": "danger", "actionType": "confirm" }
  ]
}
PropertyTypeDescription
titlestringCRUD view title.
resourcestringResource identifier for API calls.
apistringBase API endpoint URL.
columnsTableColumn[]Required. Column definitions for the table view.
fieldsFormField[]Field definitions for create/edit forms.
operationsobjectToggle CRUD operations: create, read, update, delete, export, import.
toolbarCRUDToolbarToolbar configuration with search, filters, and custom actions.
filtersCRUDFilter[]Filter definitions.
paginationCRUDPaginationPagination settings with pageSize and pageSizeOptions.
selectableboolean | "single" | "multiple"Row selection mode.
rowActionsActionSchema[]Actions available on each row.
batchActionsActionSchema[]Actions for selected rows.
defaultSort / defaultSortOrderstring / "asc" | "desc"Default sort field and direction.
mode"table" | "grid" | "list" | "kanban"Display mode for the CRUD view.
emptyStateSchemaNodeCustom empty state content.

Related: ActionSchema, TableSchema, ObjectGridSchema


ActionSchema

A powerful action definition supporting API calls, confirmations, dialogs, chaining, and conditional execution.

{
  "type": "action",
  "label": "Submit Order",
  "level": "primary",
  "icon": "Send",
  "actionType": "ajax",
  "api": "/api/orders",
  "method": "POST",
  "data": { "status": "submitted" },
  "confirm": {
    "title": "Submit Order?",
    "message": "This will send the order to the warehouse.",
    "confirmText": "Yes, Submit",
    "confirmVariant": "default"
  },
  "successMessage": "Order submitted successfully",
  "errorMessage": "Failed to submit order",
  "chain": [
    {
      "type": "action",
      "label": "Refresh",
      "actionType": "button",
      "reload": true
    }
  ],
  "chainMode": "sequential",
  "condition": {
    "expression": "${data.items.length > 0}"
  },
  "retry": {
    "maxAttempts": 3,
    "delay": 1000
  }
}
PropertyTypeDescription
labelstringRequired. Action display text.
levelstringSemantic level: "primary", "secondary", "success", "warning", "danger", "info".
iconstringLucide icon name.
actionTypestringAction kind: "button", "link", "dropdown", "ajax", "confirm", "dialog".
apistringAPI endpoint for ajax actions.
methodstringHTTP method: "GET", "POST", "PUT", "DELETE", "PATCH".
dataanyRequest body data.
confirmobjectConfirmation dialog with title, message, confirmText, cancelText.
dialogobjectModal dialog with title, content, size, actions.
chainActionSchema[]Actions to execute after this action completes.
chainMode"sequential" | "parallel"How chained actions execute.
conditionActionConditionConditional execution with expression, then, else.
successMessage / errorMessagestringToast messages on success/failure.
reloadbooleanReload data after action completes.
redirectstringURL to navigate to after action.
retryobjectRetry config with maxAttempts and delay.

Related: CRUDSchema, ButtonSchema


DetailSchema

A single-record detail view with grouped fields, actions, and tabs.

{
  "type": "detail",
  "title": "Order #1042",
  "api": "/api/orders/1042",
  "showBack": true,
  "groups": [
    {
      "title": "Customer Info",
      "fields": [
        { "name": "customer", "label": "Customer", "type": "text" },
        { "name": "email", "label": "Email", "type": "link" },
        { "name": "created", "label": "Created", "type": "date", "format": "MMM d, yyyy" }
      ]
    },
    {
      "title": "Order Details",
      "fields": [
        { "name": "total", "label": "Total", "type": "text" },
        { "name": "status", "label": "Status", "type": "badge" }
      ]
    }
  ],
  "actions": [
    { "type": "action", "label": "Edit", "icon": "Pencil", "level": "primary" },
    { "type": "action", "label": "Delete", "icon": "Trash2", "level": "danger", "actionType": "confirm" }
  ],
  "tabs": [
    {
      "key": "items",
      "label": "Line Items",
      "content": { "type": "table", "columns": [], "data": [] }
    },
    {
      "key": "history",
      "label": "History",
      "content": { "type": "timeline", "events": [] }
    }
  ]
}
PropertyTypeDescription
titlestringDetail page title.
apistringAPI endpoint to fetch record data.
resourceIdstring | numberID of the record to display.
groupsarrayField groups, each with title, description, and fields.
actionsActionSchema[]Available actions (edit, delete, etc.).
tabsarrayAdditional tabbed content with key, label, and content.
showBackbooleanShow a back navigation button.
loadingbooleanShow loading state.

Related: DetailViewSchema, CRUDSchema


ObjectQL Schemas

These schemas integrate with ObjectStack for automatic data fetching, but work with any backend through the data prop.

ObjectGridSchema

A data grid that auto-fetches from an ObjectQL object definition. Includes search, filters, pagination, grouping, and inline editing.

{
  "type": "object-grid",
  "objectName": "Contact",
  "title": "All Contacts",
  "description": "Manage your contacts",
  "showSearch": true,
  "showFilters": true,
  "showPagination": true,
  "pageSize": 25,
  "resizableColumns": true,
  "striped": true,
  "columns": [
    "name",
    "email",
    "company",
    "phone",
    { "name": "status", "label": "Status", "sortable": true }
  ],
  "defaultSort": { "field": "name", "order": "asc" },
  "operations": {
    "create": true,
    "read": true,
    "update": true,
    "delete": true,
    "export": true
  },
  "rowActions": ["edit", "delete"],
  "selection": {
    "enabled": true,
    "mode": "multiple"
  },
  "pagination": {
    "enabled": true,
    "pageSize": 25,
    "pageSizeOptions": [10, 25, 50, 100]
  }
}
PropertyTypeDescription
objectNamestringRequired. ObjectQL object API name.
columnsstring[] | ListColumn[]Columns to display. Strings auto-resolve from object metadata.
filterany[]Pre-applied filter conditions.
sortstring | SortConfig[]Default sort configuration.
searchableFieldsstring[]Fields included in search.
selectionSelectionConfigRow selection configuration.
paginationPaginationConfigPagination settings.
operationsobjectEnabled CRUD operations.
rowActions / batchActionsstring[]Action identifiers for rows and batch selection.
editablebooleanEnable inline cell editing.
groupingGroupingConfigRow grouping configuration.
frozenColumnsnumberNumber of columns frozen on scroll.
navigationViewNavigationConfigSPA navigation configuration.

Related: ObjectViewSchema, CRUDSchema, TableSchema


ObjectFormSchema

A smart form that auto-generates fields from an ObjectQL object. Supports simple, tabbed, wizard, split, drawer, and modal layouts.

{
  "type": "object-form",
  "objectName": "Contact",
  "mode": "create",
  "formType": "tabbed",
  "title": "New Contact",
  "layout": "vertical",
  "columns": 2,
  "fields": ["firstName", "lastName", "email", "phone", "company"],
  "sections": [
    {
      "title": "Basic Info",
      "fields": ["firstName", "lastName", "email"]
    },
    {
      "title": "Details",
      "fields": ["phone", "company", "address"]
    }
  ],
  "groups": [
    {
      "title": "Contact Information",
      "fields": ["firstName", "lastName", "email"],
      "collapsible": true
    }
  ],
  "showSubmit": true,
  "submitText": "Create Contact",
  "showCancel": true,
  "cancelText": "Cancel"
}
PropertyTypeDescription
objectNamestringRequired. ObjectQL object API name.
mode"create" | "edit" | "view"Required. Form interaction mode.
formTypestringLayout type: "simple", "tabbed", "wizard", "split", "drawer", "modal".
recordIdstring | numberRecord ID for edit/view modes.
fieldsstring[]Field API names to include (auto-resolved from object metadata).
customFieldsFormField[]Manually defined fields that override auto-generated ones.
sectionsObjectFormSection[]Tabbed/wizard sections.
groupsarrayCollapsible field groups.
layoutstringLabel layout: "vertical", "horizontal", "inline", "grid".
columnsnumberNumber of form columns.
submitText / cancelTextstringButton labels.
showSubmit / showCancel / showResetbooleanToggle action buttons.
drawerSidestringDrawer position: "top", "bottom", "left", "right".
modalSizestringModal size: "sm", "default", "lg", "xl", "full".

Related: FormSchema, ObjectViewSchema


ObjectViewSchema

A complete object management interface combining grid, form, search, filters, and view switching.

{
  "type": "object-view",
  "objectName": "Deal",
  "title": "Sales Pipeline",
  "description": "Manage your deals",
  "defaultViewType": "kanban",
  "showSearch": true,
  "showFilters": true,
  "showCreate": true,
  "showRefresh": true,
  "showViewSwitcher": true,
  "operations": {
    "create": true,
    "read": true,
    "update": true,
    "delete": true
  },
  "searchableFields": ["name", "company", "owner"],
  "filterableFields": ["stage", "owner", "value"],
  "listViews": {
    "all": {
      "label": "All Deals",
      "filter": [],
      "sort": [{ "field": "value", "order": "desc" }]
    },
    "my-deals": {
      "label": "My Deals",
      "filter": [["owner", "=", "${currentUser.id}"]],
      "default": true
    }
  },
  "table": {
    "columns": ["name", "stage", "value", "owner", "closeDate"],
    "pageSize": 25
  },
  "form": {
    "formType": "drawer",
    "drawerSide": "right",
    "fields": ["name", "stage", "value", "owner", "closeDate", "notes"]
  }
}
PropertyTypeDescription
objectNamestringRequired. ObjectQL object API name.
titlestringView title.
defaultViewTypestringInitial view: "grid", "kanban", "gallery", "calendar", "timeline", "gantt", "map".
listViewsRecord<string, NamedListView>Named list views with filters and sort.
defaultListViewstringKey of the default list view.
tablePartial<ObjectGridSchema>Grid configuration overrides.
formPartial<ObjectFormSchema>Form configuration overrides.
showSearch / showFilters / showCreate / showRefreshbooleanToggle toolbar features.
showViewSwitcherbooleanShow view type toggle (grid, kanban, etc.).
operationsobjectEnabled CRUD operations.
navigationViewNavigationConfigSPA-aware navigation.

Related: ObjectGridSchema, ObjectFormSchema, ViewSwitcherSchema


Complex Schemas

KanbanSchema

A drag-and-drop Kanban board with columns and cards.

{
  "type": "kanban",
  "draggable": true,
  "columns": [
    {
      "id": "todo",
      "title": "To Do",
      "color": "#6366f1",
      "cards": [
        { "id": "task-1", "title": "Design mockups", "description": "Create wireframes for new feature" },
        { "id": "task-2", "title": "Write tests", "description": "Unit tests for auth module" }
      ]
    },
    {
      "id": "in-progress",
      "title": "In Progress",
      "color": "#f59e0b",
      "cards": [
        { "id": "task-3", "title": "API integration", "description": "Connect to payment gateway" }
      ]
    },
    {
      "id": "done",
      "title": "Done",
      "color": "#22c55e",
      "cards": []
    }
  ]
}
PropertyTypeDescription
columnsKanbanColumn[]Required. Board columns, each with id, title, color, and cards.
draggablebooleanEnable drag-and-drop between columns.
onCardMovefunctionCallback when a card is moved: (cardId, fromColumn, toColumn, position).
onCardClickfunctionCallback when a card is clicked.
onColumnAddfunctionCallback when a new column is added.
onCardAddfunctionCallback when a new card is added to a column.

Related: ObjectViewSchema, CRUDSchema


DashboardSchema

A widget-based dashboard with configurable grid layout and auto-refresh.

{
  "type": "dashboard",
  "columns": 4,
  "gap": 6,
  "refreshInterval": 30000,
  "widgets": [
    {
      "id": "revenue",
      "title": "Total Revenue",
      "description": "Monthly revenue",
      "colSpan": 1,
      "rowSpan": 1,
      "body": {
        "type": "statistic",
        "label": "Revenue",
        "value": "$48,200",
        "trend": { "value": 12, "direction": "up" }
      }
    },
    {
      "id": "chart",
      "title": "Sales Trend",
      "colSpan": 2,
      "rowSpan": 1,
      "body": {
        "type": "chart",
        "chartType": "area",
        "categories": ["Mon", "Tue", "Wed", "Thu", "Fri"],
        "series": [{ "name": "Sales", "data": [120, 180, 150, 210, 190] }]
      }
    },
    {
      "id": "tasks",
      "title": "Recent Tasks",
      "colSpan": 1,
      "rowSpan": 1,
      "body": {
        "type": "list",
        "items": []
      }
    }
  ]
}
PropertyTypeDescription
columnsnumberNumber of grid columns.
gapnumberGap between widgets (Tailwind spacing scale).
widgetsDashboardWidgetSchema[]Required. Widget definitions with id, title, colSpan, rowSpan, and body.
refreshIntervalnumberAuto-refresh interval in milliseconds.

Each widget supports colSpan and rowSpan to control its size in the grid. The body can be any SchemaNode.

Related: GridSchema, ChartSchema, CardSchema


CalendarViewSchema

A multi-view calendar for displaying and managing events.

{
  "type": "calendar-view",
  "defaultView": "month",
  "views": ["month", "week", "day", "agenda"],
  "editable": true,
  "events": [
    {
      "id": "evt-1",
      "title": "Team Standup",
      "start": "2024-03-15T09:00:00",
      "end": "2024-03-15T09:30:00",
      "color": "#3b82f6"
    },
    {
      "id": "evt-2",
      "title": "Sprint Review",
      "start": "2024-03-15T14:00:00",
      "end": "2024-03-15T15:00:00",
      "color": "#8b5cf6",
      "allDay": false
    }
  ]
}
PropertyTypeDescription
eventsCalendarEvent[]Required. Events with id, title, start, end, optional color and allDay.
defaultViewCalendarViewModeInitial view: "month", "week", "day", "agenda".
viewsCalendarViewMode[]Available view modes the user can switch between.
editablebooleanAllow creating and modifying events.
defaultDatestring | DateInitial calendar date.
onEventClickfunctionCallback when an event is clicked.
onEventCreatefunctionCallback for new event creation: (start, end).
onEventUpdatefunctionCallback when an event is modified.
onDateChangefunctionCallback when the visible date range changes.

Related: ObjectViewSchema, DashboardSchema


View Schemas

DetailViewSchema

An enhanced detail view for a single record with sections, tabs, related records, and navigation.

{
  "type": "detail-view",
  "title": "Contact Details",
  "objectName": "Contact",
  "resourceId": "contact-123",
  "layout": "grid",
  "columns": 2,
  "showBack": true,
  "backUrl": "/contacts",
  "showEdit": true,
  "editUrl": "/contacts/contact-123/edit",
  "showDelete": true,
  "deleteConfirmation": "Are you sure you want to delete this contact?",
  "sections": [
    {
      "title": "Personal Information",
      "icon": "User",
      "columns": 2,
      "collapsible": true,
      "fields": [
        { "name": "firstName", "label": "First Name", "type": "text" },
        { "name": "lastName", "label": "Last Name", "type": "text" },
        { "name": "email", "label": "Email", "type": "link" },
        { "name": "avatar", "label": "Photo", "type": "image" }
      ]
    }
  ],
  "tabs": [
    {
      "key": "activities",
      "label": "Activities",
      "icon": "Activity",
      "badge": 5,
      "content": { "type": "timeline", "events": [] }
    }
  ],
  "related": [
    {
      "title": "Recent Orders",
      "type": "table",
      "api": "/api/contacts/contact-123/orders",
      "columns": [
        { "name": "id", "label": "Order #" },
        { "name": "total", "label": "Total" },
        { "name": "status", "label": "Status" }
      ]
    }
  ],
  "actions": [
    { "type": "action", "label": "Send Email", "icon": "Mail", "level": "primary" }
  ]
}
PropertyTypeDescription
titlestringDetail page title.
objectNamestringObjectQL object name for data binding.
resourceIdstring | numberRecord ID to display.
apistringAPI endpoint to fetch record data.
dataanyStatic data (if not fetching from API).
layout"vertical" | "horizontal" | "grid"Field layout mode.
columnsnumberGrid columns (for grid layout).
sectionsDetailViewSection[]Field groups with title, icon, fields, collapsible.
fieldsDetailViewField[]Direct fields (without sections).
tabsDetailViewTab[]Tabbed content with key, label, icon, badge, content.
relatedarrayRelated record sections with title, type, api, columns.
actionsActionSchema[]Available actions.
showBack / backUrlboolean / stringBack navigation.
showEdit / editUrlboolean / stringEdit navigation.
showDelete / deleteConfirmationboolean / stringDelete with confirmation message.
header / footerSchemaNodeCustom header/footer content.

Related: DetailSchema, ObjectViewSchema


ViewSwitcherSchema

A toggle control that switches between different view types (list, grid, kanban, calendar, etc.).

{
  "type": "view-switcher",
  "defaultView": "list",
  "variant": "tabs",
  "position": "top",
  "persistPreference": true,
  "storageKey": "contacts-view-pref",
  "views": [
    {
      "type": "list",
      "label": "List View",
      "icon": "List",
      "schema": {
        "type": "object-grid",
        "objectName": "Contact",
        "columns": ["name", "email", "phone"]
      }
    },
    {
      "type": "grid",
      "label": "Card View",
      "icon": "LayoutGrid",
      "schema": {
        "type": "grid",
        "columns": 3,
        "children": []
      }
    },
    {
      "type": "kanban",
      "label": "Kanban",
      "icon": "Kanban",
      "schema": {
        "type": "kanban",
        "columns": []
      }
    }
  ]
}
PropertyTypeDescription
viewsarrayRequired. Available views, each with type, label, icon, and schema.
defaultViewViewTypeInitially active view: "list", "detail", "grid", "kanban", "calendar", "timeline", "map".
activeViewViewTypeControlled active view.
variant"tabs" | "buttons" | "dropdown"Switcher UI style.
position"top" | "bottom" | "left" | "right"Switcher position relative to content.
persistPreferencebooleanSave the user's view preference to storage.
storageKeystringStorage key for persisting the preference.
onViewChangestringExpression or callback invoked on view change.

Related: ObjectViewSchema, KanbanSchema, CalendarViewSchema


Schema Composition

Schemas are designed to compose. Nest any SchemaNode inside another to build complex interfaces:

{
  "type": "page",
  "title": "CRM Dashboard",
  "body": [
    {
      "type": "grid",
      "columns": { "sm": 1, "lg": 2 },
      "gap": 6,
      "children": [
        {
          "type": "card",
          "title": "Quick Stats",
          "body": {
            "type": "dashboard",
            "columns": 2,
            "widgets": [
              { "id": "w1", "title": "Leads", "body": { "type": "statistic", "value": "142" } },
              { "id": "w2", "title": "Revenue", "body": { "type": "statistic", "value": "$24k" } }
            ]
          }
        },
        {
          "type": "card",
          "title": "Recent Activity",
          "body": {
            "type": "tabs",
            "items": [
              { "value": "deals", "label": "Deals", "content": { "type": "table", "columns": [], "data": [] } },
              { "value": "tasks", "label": "Tasks", "content": { "type": "table", "columns": [], "data": [] } }
            ]
          }
        }
      ]
    },
    {
      "type": "object-grid",
      "objectName": "Lead",
      "title": "All Leads",
      "showSearch": true,
      "columns": ["name", "company", "status", "value"]
    }
  ]
}

Type Imports

Import only the types you need:

// Layout
import type { PageSchema, DivSchema, CardSchema, GridSchema, TabsSchema } from '@object-ui/types';

// Forms
import type { FormSchema, InputSchema, SelectSchema, ButtonSchema } from '@object-ui/types';

// Data Display
import type { TableSchema, ChartSchema, TreeViewSchema } from '@object-ui/types';

// CRUD
import type { CRUDSchema, ActionSchema, DetailSchema } from '@object-ui/types';

// ObjectQL
import type { ObjectGridSchema, ObjectFormSchema, ObjectViewSchema } from '@object-ui/types';

// Complex
import type { KanbanSchema, DashboardSchema, CalendarViewSchema } from '@object-ui/types';

// Views
import type { DetailViewSchema, ViewSwitcherSchema } from '@object-ui/types';

// Base
import type { BaseSchema, SchemaNode } from '@object-ui/types';

Next Steps

On this page