ObjectStackObjectStack

Component

Component protocol schemas

Empty Properties Schema

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

TypeScript Usage

import { AIChatWindowProps, ElementButtonProps, ElementFilterProps, ElementFormProps, ElementImageProps, ElementNumberProps, ElementRecordPickerProps, ElementTextProps, PageAccordionProps, PageCardProps, PageHeaderProps, PageTabsProps, RecordActivityProps, RecordChatterProps, RecordDetailsProps, RecordHighlightsProps, RecordPathProps, RecordRelatedListProps } from '@objectstack/spec/ui';
import type { AIChatWindowProps, ElementButtonProps, ElementFilterProps, ElementFormProps, ElementImageProps, ElementNumberProps, ElementRecordPickerProps, ElementTextProps, PageAccordionProps, PageCardProps, PageHeaderProps, PageTabsProps, RecordActivityProps, RecordChatterProps, RecordDetailsProps, 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
labelstring | ObjectButton 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'>Form mode
submitLabelstring | ObjectoptionalSubmit button label
onSubmitstringoptionalAction expression on form submit
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

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)
placeholderstring | ObjectoptionalPlaceholder text
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
titlestring | ObjectoptionalDisplay label: plain string or i18n translation object
borderedboolean
actionsstring[]optional
bodyany[]optionalCard content components (slot)
footerany[]optionalCard footer components (slot)
ariaObjectoptionalARIA accessibility attributes

PageHeaderProps

Properties

PropertyTypeRequiredDescription
titlestring | ObjectPage title
subtitlestring | ObjectoptionalPage subtitle
iconstringoptionalIcon name
breadcrumbbooleanShow breadcrumb
actionsstring[]optionalAction IDs to show in header
ariaObjectoptionalARIA accessibility attributes

PageTabsProps

Properties

PropertyTypeRequiredDescription
typeEnum<'line' | 'card' | 'pill'>
positionEnum<'top' | 'left'>
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 compactLayout, custom uses explicit sections
sectionsstring[]optionalSection IDs to show (required when layout is "custom")
fieldsstring[]optionalExplicit field list to display (optional, overrides compactLayout)
ariaObjectoptionalARIA accessibility attributes

RecordHighlightsProps

Properties

PropertyTypeRequiredDescription
fieldsstring[]Key fields to highlight (1-7 fields max, typically displayed as prominent cards)
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")
columnsstring[]Fields to display in the related list
sortstring | Object[]optionalSort order for related records
limitintegerNumber of records to display initially
filterObject[]optionalAdditional filter criteria for related records
titlestring | ObjectoptionalCustom title for the related list
showViewAllbooleanShow "View All" link to see all related records
actionsstring[]optionalAction IDs available for related records
ariaObjectoptionalARIA accessibility attributes

On this page