ObjectStackObjectStack

Component

Component protocol schemas

Empty Properties Schema

Source: packages/spec/src/ui/component.zod.ts

TypeScript Usage

import { AIChatWindowProps, ElementButtonProps, ElementFilterProps, ElementFormProps, ElementImageProps, ElementMetadataViewerProps, ElementNumberProps, ElementRecordPickerProps, ElementTextInputProps, ElementTextProps, PageAccordionProps, PageCardProps, PageHeaderProps, PageTabsProps, RecordActivityProps, RecordChatterProps, RecordDetailsProps, RecordHighlightsField, RecordHighlightsProps, RecordPathProps, RecordRelatedListProps } from '@objectstack/spec/ui';
import type { AIChatWindowProps, ElementButtonProps, ElementFilterProps, ElementFormProps, ElementImageProps, ElementMetadataViewerProps, ElementNumberProps, ElementRecordPickerProps, ElementTextInputProps, ElementTextProps, PageAccordionProps, PageCardProps, PageHeaderProps, PageTabsProps, RecordActivityProps, RecordChatterProps, RecordDetailsProps, RecordHighlightsField, RecordHighlightsProps, RecordPathProps, RecordRelatedListProps } from '@objectstack/spec/ui';

// Validate data
const result = AIChatWindowProps.parse(data);

AIChatWindowProps

Properties

PropertyTypeRequiredDescription
modeEnum<'float' | 'sidebar' | 'inline'>Display mode for the chat window
agentIdstringoptionalSpecific AI agent to use
contextRecord<string, any>optionalContextual data to pass to the AI
ariaObjectoptionalARIA accessibility attributes

ElementButtonProps

Properties

PropertyTypeRequiredDescription
labelstringButton display label
variantEnum<'primary' | 'secondary' | 'danger' | 'ghost' | 'link'>Button visual variant
sizeEnum<'small' | 'medium' | 'large'>Button size
iconstringoptionalIcon name (Lucide icon)
iconPositionEnum<'left' | 'right'>Icon position relative to label
disabledbooleanDisable the button
ariaObjectoptionalARIA accessibility attributes

ElementFilterProps

Properties

PropertyTypeRequiredDescription
objectstringObject to filter
fieldsstring[]Filterable field names
targetVariablestringoptionalPage variable to store filter state
layoutEnum<'inline' | 'dropdown' | 'sidebar'>Filter display layout
showSearchbooleanShow search input
ariaObjectoptionalARIA accessibility attributes

ElementFormProps

Properties

PropertyTypeRequiredDescription
objectstringObject for the form
fieldsstring[]optionalFields to display (defaults to all editable fields)
modeEnum<'create' | 'edit'>optionalForm mode
submitLabelstringoptionalSubmit button label
onSubmitstring | ObjectoptionalAction expression on form submit (CEL)
ariaObjectoptionalARIA accessibility attributes

ElementImageProps

Properties

PropertyTypeRequiredDescription
srcstringImage URL or attachment field
altstringoptionalAlt text for accessibility
fitEnum<'cover' | 'contain' | 'fill'>Image object-fit mode
heightnumberoptionalFixed height in pixels
ariaObjectoptionalARIA accessibility attributes

ElementMetadataViewerProps

Properties

PropertyTypeRequiredDescription
typeEnum<'state_machine' | 'flow' | 'permission'>Metadata view kind (ADR-0051): state_machine | flow | permission
namestringTarget metadata item name; resolved package-scoped (ADR-0048), then dependencies (ADR-0046 §3.3)
objectstringoptionalOwning object — required for object-scoped kinds: state_machine is a rule ON an object (ADR-0020), permission renders a matrix FOR one; omit for top-level flow
modeEnum<'diagram' | 'matrix' | 'summary'>optionalRender form; defaults per type (diagram for flow/state_machine, matrix for permission)
detailEnum<'business' | 'technical'>Authoring altitude (ADR-0051 §3.4): business collapses technical flow nodes to business steps + approvals. NOT access (cf. book.audience); permission projection is automatic and render-time, never set here
ariaObjectoptionalARIA accessibility attributes

ElementNumberProps

Properties

PropertyTypeRequiredDescription
objectstringSource object
fieldstringoptionalField to aggregate
aggregateEnum<'count' | 'sum' | 'avg' | 'min' | 'max'>Aggregation function
filter[__schema0](./__schema0)optionalFilter criteria
formatEnum<'number' | 'currency' | 'percent'>optionalNumber display format
prefixstringoptionalPrefix text (e.g. "$")
suffixstringoptionalSuffix text (e.g. "%")
ariaObjectoptionalARIA accessibility attributes

ElementRecordPickerProps

Properties

PropertyTypeRequiredDescription
objectstringObject to pick records from
displayFieldstringField to display as the record label
searchFieldsstring[]optionalFields to search against
filter[__schema0](./__schema0)optionalFilter criteria for available records
multiplebooleanAllow multiple record selection
targetVariablestringoptionalPage variable to bind selected record ID(s)
placeholderstringoptionalPlaceholder text
ariaObjectoptionalARIA accessibility attributes

ElementTextInputProps

Properties

PropertyTypeRequiredDescription
inputTypeEnum<'text' | 'email' | 'number' | 'tel' | 'url' | 'password'>Native input type — drives keyboard/validation affordance and how the bound value is coerced (number → numeric).
labelstringoptionalField label shown above the input
placeholderstringoptionalPlaceholder text shown when empty
defaultValuestring | numberoptionalInitial value; seeds the bound page variable on mount
requiredbooleanMark the field as required
disabledbooleanDisable the input
descriptionstringoptionalHelper text shown below the input
targetVariablestringoptionalPage variable this input writes to. Declarative hint; the live binding resolves via the variable whose source equals this component id (see PageVariableSchema).
ariaObjectoptionalARIA accessibility attributes

ElementTextProps

Properties

PropertyTypeRequiredDescription
contentstringText or Markdown content
variantEnum<'heading' | 'subheading' | 'body' | 'caption'>Text style variant
alignEnum<'left' | 'center' | 'right'>Text alignment
ariaObjectoptionalARIA accessibility attributes

PageAccordionProps

Properties

PropertyTypeRequiredDescription
itemsObject[]
allowMultiplebooleanAllow multiple panels to be expanded simultaneously
ariaObjectoptionalARIA accessibility attributes

PageCardProps

Properties

PropertyTypeRequiredDescription
titlestringoptionalDisplay label (plain string; i18n keys are auto-generated by the framework)
borderedboolean
actionsstring[]optional
bodyany[]optionalCard content components (slot)
footerany[]optionalCard footer components (slot)
ariaObjectoptionalARIA accessibility attributes

PageHeaderProps

Properties

PropertyTypeRequiredDescription
titlestringPage title
subtitlestringoptionalPage subtitle
iconstringoptionalIcon name
breadcrumbbooleanShow breadcrumb
actionsstring[]optionalAction IDs to show in header
ariaObjectoptionalARIA accessibility attributes

PageTabsProps

Properties

PropertyTypeRequiredDescription
typeEnum<'line' | 'card' | 'pill'>optional
positionEnum<'top' | 'left'>optional
itemsObject[]
ariaObjectoptionalARIA accessibility attributes

RecordActivityProps

Properties

PropertyTypeRequiredDescription
typesEnum<'comment' | 'field_change' | 'task' | 'event' | 'email' | 'call' | 'note' | 'file' | 'record_create' | 'record_delete' | 'approval' | 'sharing' | 'system'>[]optionalFeed item types to show (default: all)
filterModeEnum<'all' | 'comments_only' | 'changes_only' | 'tasks_only'>Default activity filter
showFilterTogglebooleanShow filter dropdown in panel header
limitintegerNumber of items to load per page
showCompletedbooleanInclude completed activities
unifiedTimelinebooleanMix field changes and comments in one timeline (Airtable style)
showCommentInputbooleanShow "Leave a comment" input at the bottom
enableMentionsbooleanEnable @mentions in comments
enableReactionsbooleanEnable emoji reactions on feed items
enableThreadingbooleanEnable threaded replies on comments
showSubscriptionTogglebooleanShow bell icon for record-level notification subscription
ariaObjectoptionalARIA accessibility attributes

RecordChatterProps

Properties

PropertyTypeRequiredDescription
positionEnum<'sidebar' | 'inline' | 'drawer'>Where to render the chatter panel
widthstring | numberoptionalPanel width (e.g., "350px", "30%")
collapsiblebooleanWhether the panel can be collapsed
defaultCollapsedbooleanWhether the panel starts collapsed
feedObjectoptionalEmbedded activity feed configuration
ariaObjectoptionalARIA accessibility attributes

RecordDetailsProps

Properties

PropertyTypeRequiredDescription
columnsEnum<'1' | '2' | '3' | '4'>Number of columns for field layout (1-4)
layoutEnum<'auto' | 'custom'>Layout mode: auto uses object highlightFields, custom uses explicit sections
sectionsstring[]optionalSection IDs to show (required when layout is "custom")
fieldsstring[]optionalExplicit field list to display (optional, overrides highlightFields)
ariaObjectoptionalARIA accessibility attributes

RecordHighlightsField

Highlight field: bare name, or {name,label?,icon?,type?}

Union Options

This schema accepts one of the following structures:

Option 1

Type: string


Option 2

Properties

PropertyTypeRequiredDescription
namestringField name on the record
labelstringoptionalDisplay label (overrides schema label)
iconstringoptionalIcon name (lucide icon key)
typestringoptionalOverride cell renderer type (rare)


RecordHighlightsProps

Properties

PropertyTypeRequiredDescription
fieldsstring | Object[]Key fields to highlight (1-7 fields max, typically displayed as prominent cards). Each item may be a bare field name or {name, label?, icon?, type?} for inline overrides.
layoutEnum<'horizontal' | 'vertical'>Layout orientation for highlight fields
ariaObjectoptionalARIA accessibility attributes

RecordPathProps

Properties

PropertyTypeRequiredDescription
statusFieldstringField name representing the current status/stage
stagesObject[]optionalExplicit stage definitions (if not using field metadata)
ariaObjectoptionalARIA accessibility attributes

RecordRelatedListProps

Properties

PropertyTypeRequiredDescription
objectNamestringRelated object name (e.g., "task", "opportunity")
relationshipFieldstringField on related object that points to this record (e.g., "account_id")
relationshipValueFieldstringParent-record field whose value relationshipField stores (default 'id'; e.g. 'name' for name-keyed junctions).
columnsstring[]optionalFields to display in the related list. Optional: when omitted, columns derive from the related object's highlightFields / default list columns (a related list is just another surface that lists that object). Override chain: child highlightFields → field-level relatedListColumns → this inline list.
sortstring | Object[]optionalSort order for related records
limitintegerNumber of records to display initially
filterObject[]optionalAdditional filter criteria for related records
titlestringoptionalCustom title for the related list
showViewAllbooleanShow "View All" link to see all related records
actionsstring[]optionalAction IDs available for related records
addObjectoptionalAdd-existing-via-picker config (generic m2m/junction assignment).
ariaObjectoptionalARIA accessibility attributes

On this page