Components Overview

All available UI components

Components Overview

Orbis provides 35+ UI components organized into categories. Each component is defined by a JSON schema and rendered by the SchemaRenderer.

Component Categories

CategoryComponentsPurpose
Layout6Structure and spacing
Typography2Text display
Forms2User input
Data Display9Showing data
Feedback5User notifications
Navigation6User interaction
Overlays2Dialogs and tooltips
Advanced7Dynamic rendering

Common Properties

All components share these base properties:

typescript
interface BaseSchema {
  type: string;           // Component type (required)
  visible?: string;       // Visibility expression
  className?: string;     // CSS classes (Tailwind)
  style?: object;         // Inline styles
  ariaLabel?: string;     // Accessibility label
}

type

The component type identifier (required).

json
{ "type": "Button" }

visible

Expression controlling visibility:

json
{
  "type": "Card",
  "visible": "{{state.showCard}}"
}

Supports complex expressions:

json
{ "visible": "{{state.count}} > 0 && {{state.isActive}}" }

className

Tailwind CSS classes:

json
{
  "type": "Container",
  "className": "p-6 bg-white rounded-lg shadow"
}

Event Handling

Components with interactivity have events:

json
{
  "type": "Button",
  "label": "Click Me",
  "events": {
    "on_click": [
      { "type": "update_state", "path": "count", "value": "{{state.count}} + 1" }
    ]
  }
}

Available events vary by component. See individual component docs.

Expressions in Properties

Most string properties support expressions:

json
{
  "type": "Text",
  "content": "Hello, {{state.userName}}!"
}

See Expressions for full syntax.

Quick Reference

Layout Components

ComponentPurpose
ContainerBlock wrapper
FlexFlexbox layout
GridGrid layout
SpacerVertical space
DividerVisual separator
SectionSemantic grouping

Typography Components

ComponentPurpose
TextParagraph text
HeadingHeadings (h1-h6)

Form Components

ComponentPurpose
FormForm container
FieldForm field

Data Display Components

ComponentPurpose
TableData tables
ListLists and menus
CardContent cards
StatCardStatistics display
DataDisplayKey-value pairs
BadgeLabels and tags
AvatarUser images
ImageImages
ChartData visualization

Feedback Components

ComponentPurpose
AlertNotifications
ProgressProgress bars
SkeletonLoading placeholders
LoadingOverlayLoading states
EmptyStateEmpty content
ComponentPurpose
ButtonClickable buttons
LinkNavigation links
TabsTab navigation
BreadcrumbPath navigation
DropdownDropdown menus
PageHeaderPage headers

Overlay Components

ComponentPurpose
ModalDialog windows
TooltipHover tooltips

Advanced Components

ComponentPurpose
ConditionalConditional rendering
LoopList iteration
AccordionCollapsible sections
IconIcon display
FragmentInvisible wrapper
SlotPlugin slots
CustomCustom components

Usage Patterns

Container with Children

json
{
  "type": "Container",
  "className": "p-6",
  "children": [
    { "type": "Heading", "text": "Title", "level": 1 },
    { "type": "Text", "content": "Description text here." }
  ]
}

Data-Bound Component

json
{
  "type": "Table",
  "dataSource": "state:items",
  "columns": [
    { "key": "name", "label": "Name" },
    { "key": "status", "label": "Status" }
  ]
}

Interactive Component

json
{
  "type": "Button",
  "label": "Save",
  "variant": "default",
  "events": {
    "on_click": [
      { "type": "call_api", "api": "saveData" },
      { "type": "show_toast", "message": "Saved!" }
    ]
  }
}

Conditional Rendering

json
{
  "type": "Conditional",
  "condition": "{{state.isLoading}}",
  "then": { "type": "Skeleton" },
  "else": { "type": "Card", "content": { "..." } }
}

Styling

Tailwind Classes

All components support className for Tailwind:

json
{
  "type": "Card",
  "className": "bg-gradient-to-r from-blue-500 to-purple-500 text-white"
}

Responsive Classes

json
{
  "type": "Grid",
  "columns": { "sm": 1, "md": 2, "lg": 3 },
  "className": "gap-4 md:gap-6"
}

Dark Mode

Use dark: prefix:

json
{
  "className": "bg-white dark:bg-gray-900 text-gray-900 dark:text-white"
}

Next Steps

Explore each component category: