|
| 1 | +# Component Library Reference |
| 2 | + |
| 3 | +This document provides a reference for all the low-level UI components available in the **Object-UI Renderer**. |
| 4 | +These components are registered in the `ComponentRegistry` and can be used directly in your JSON Schema definitions. |
| 5 | + |
| 6 | +## 1. Basic Components |
| 7 | +Fundamental building blocks for structure and text. |
| 8 | + |
| 9 | +| Component Name | Description | Key Properties | |
| 10 | +|:---|:---|:---| |
| 11 | +| `div` | A standard container element | `className`, `children` | |
| 12 | +| `span` | Inline container element | `className`, `children` | |
| 13 | +| `text` | Simple text node | `value`, `className` | |
| 14 | +| `separator` | A visual divider | `orientation` | |
| 15 | + |
| 16 | +## 2. Form Components |
| 17 | +Input controls for data collection. |
| 18 | + |
| 19 | +| Component Name | Description | Key Properties | |
| 20 | +|:---|:---|:---| |
| 21 | +| `button` | Clickable button | `label`, `variant`, `size`, `onClick` | |
| 22 | +| `input` | Single-line text input | `type`, `placeholder` | |
| 23 | +| `textarea` | Multi-line text input | `placeholder`, `rows` | |
| 24 | +| `checkbox` | Boolean toggle box | `label`, `checked` | |
| 25 | +| `switch` | Boolean toggle switch | `label`, `checked` | |
| 26 | +| `select` | Dropdown selection | `placeholder`, `options` | |
| 27 | +| `slider` | Range slider | `min`, `max`, `step`, `defaultValue` | |
| 28 | +| `radio-group` | Single selection from list | `items`, `defaultValue` | |
| 29 | +| `toggle` | Two-state button | `pressed`, `size`, `variant` | |
| 30 | +| `toggle-group` | Set of two-state buttons | `type`, `items` | |
| 31 | +| `input-otp` | One-time password input | `maxLength` | |
| 32 | +| `calendar` | Date picker view | `mode`, `selected` | |
| 33 | + |
| 34 | +## 3. Layout Components |
| 35 | +Components for organizing page structure. |
| 36 | + |
| 37 | +| Component Name | Description | Key Properties | |
| 38 | +|:---|:---|:---| |
| 39 | +| `card` | Container with header/content/footer | `title`, `description`, `content`, `footer` | |
| 40 | +| `tabs` | Tabbed content areas | `defaultValue`, `items` | |
| 41 | +| `resizable` | Resizable panel groups | `direction`, `panels` | |
| 42 | +| `scroll-area` | Scrollable container | `height`, `width`, `orientation` | |
| 43 | + |
| 44 | +## 4. Navigation Components |
| 45 | +Components for moving between views or contexts. |
| 46 | + |
| 47 | +| Component Name | Description | Key Properties | |
| 48 | +|:---|:---|:---| |
| 49 | +| `header-bar` | Top navigation bar | `title`, `user`, `items` | |
| 50 | +| `sidebar-provider` | Root provider for sidebar context | - | |
| 51 | +| `sidebar` | Main sidebar container | `side`, `collapsible`, `variant` | |
| 52 | +| `sidebar-header` | Sidebar top section | `children` | |
| 53 | +| `sidebar-content` | Sidebar scrollable content | `children` | |
| 54 | +| `sidebar-group` | Grouping of sidebar items | `label` | |
| 55 | +| `sidebar-menu` | Menu list within a group | `children` | |
| 56 | +| `sidebar-menu-item` | Individual menu item wrapper | `children` | |
| 57 | +| `sidebar-menu-button` | Clickable menu button | `isActive`, `tooltip`, `children` | |
| 58 | +| `sidebar-footer` | Sidebar bottom section | `children` | |
| 59 | +| `sidebar-trigger` | Button to toggle sidebar | - | |
| 60 | + |
| 61 | +## 5. Data Display Components |
| 62 | +Components for visualizing data. |
| 63 | + |
| 64 | +| Component Name | Description | Key Properties | |
| 65 | +|:---|:---|:---| |
| 66 | +| `badge` | Status/Tag indicator | `variant`, `children` | |
| 67 | +| `avatar` | User image/initials | `src`, `alt`, `fallback` | |
| 68 | +| `alert` | Highlighted message | `variant`, `title`, `description` | |
| 69 | +| `table` | Data-driven table | `columns`, `data`, `caption`, `footer` | |
| 70 | +| `carousel` | Slideshow component | `items`, `orientation`, `showArrows` | |
| 71 | + |
| 72 | +## 6. Feedback Components |
| 73 | +Indicators for system status or feedback. |
| 74 | + |
| 75 | +| Component Name | Description | Key Properties | |
| 76 | +|:---|:---|:---| |
| 77 | +| `progress` | Progress bar | `value` | |
| 78 | +| `skeleton` | Loading placeholder state | `width`, `height` | |
| 79 | +| `toaster` | Toast notification provider | `provider` | |
| 80 | + |
| 81 | +## 7. Overlay Components |
| 82 | +Content that appears on top of other content. |
| 83 | + |
| 84 | +| Component Name | Description | Key Properties | |
| 85 | +|:---|:---|:---| |
| 86 | +| `dialog` | Modal dialog window | `trigger`, `content`, `title`, `description` | |
| 87 | +| `alert-dialog` | Urgent modal interruption | `title`, `description`, `actionText`, `cancelText` | |
| 88 | +| `sheet` | Slide-out panel | `side`, `trigger`, `content` | |
| 89 | +| `drawer` | Bottom/Side drawer | `trigger`, `content`, `shouldScaleBackground` | |
| 90 | +| `popover` | Content popup on trigger | `trigger`, `content`, `align` | |
| 91 | +| `tooltip` | Hover info tip | `trigger`, `content`, `side` | |
| 92 | +| `hover-card` | Preview card on hover | `trigger`, `content` | |
| 93 | +| `dropdown-menu` | Menu from a trigger | `trigger`, `items` (recursive) | |
| 94 | +| `context-menu` | Menu from right-click | `trigger`, `items` (recursive) | |
| 95 | + |
| 96 | +## 8. Disclosure Components |
| 97 | +Components that hide/show content. |
| 98 | + |
| 99 | +| Component Name | Description | Key Properties | |
| 100 | +|:---|:---|:---| |
| 101 | +| `accordion` | Vertically stacked headers | `items`, `type`, `collapsible` | |
| 102 | +| `collapsible` | Expandable section | `trigger`, `content`, `open` | |
| 103 | + |
0 commit comments