|
| 1 | +--- |
| 2 | +title: "Plugin Gallery" |
| 3 | +description: "Explore all ObjectUI plugins for extended functionality" |
| 4 | +--- |
| 5 | + |
| 6 | +# Plugin Gallery |
| 7 | + |
| 8 | +ObjectUI plugins are lazy-loaded component packages that extend the framework with additional functionality. They load on-demand, keeping your main application bundle small while providing rich features. |
| 9 | + |
| 10 | +## Quick Navigation |
| 11 | + |
| 12 | +Browse available plugins: |
| 13 | + |
| 14 | +### [Charts Plugin](/docs/plugins/plugin-charts) |
| 15 | +Data visualization with Recharts - Bar, Line, Area, and Pie charts |
| 16 | + |
| 17 | +### [Editor Plugin](/docs/plugins/plugin-editor) |
| 18 | +Code editor powered by Monaco Editor (VS Code's editor) |
| 19 | + |
| 20 | +### [Kanban Plugin](/docs/plugins/plugin-kanban) |
| 21 | +Kanban board with drag-and-drop functionality |
| 22 | + |
| 23 | +### [Markdown Plugin](/docs/plugins/plugin-markdown) |
| 24 | +Markdown renderer with GitHub Flavored Markdown support |
| 25 | + |
| 26 | +### [Object Plugin](/docs/plugins/plugin-object) |
| 27 | +Advanced object data management and visualization |
| 28 | + |
| 29 | +## Official Plugins |
| 30 | + |
| 31 | +### Charts Plugin |
| 32 | + |
| 33 | +**[@object-ui/plugin-charts](/docs/plugins/plugin-charts)** - Data visualization components powered by Recharts. |
| 34 | + |
| 35 | +- Bar, line, area, and pie charts |
| 36 | +- Responsive design |
| 37 | +- Customizable colors and themes |
| 38 | +- Lazy-loaded (~540 KB) |
| 39 | + |
| 40 | +```bash |
| 41 | +npm install @object-ui/plugin-charts |
| 42 | +``` |
| 43 | + |
| 44 | +[Read full documentation →](/docs/plugins/plugin-charts) |
| 45 | + |
| 46 | +--- |
| 47 | + |
| 48 | +### Editor Plugin |
| 49 | + |
| 50 | +**[@object-ui/plugin-editor](/docs/plugins/plugin-editor)** - Code editor component powered by Monaco Editor (VS Code's editor). |
| 51 | + |
| 52 | +- Syntax highlighting for 100+ languages |
| 53 | +- IntelliSense and code completion |
| 54 | +- Multiple themes (VS Dark, Light, etc.) |
| 55 | +- Lazy-loaded (~20 KB) |
| 56 | + |
| 57 | +```bash |
| 58 | +npm install @object-ui/plugin-editor |
| 59 | +``` |
| 60 | + |
| 61 | +[Read full documentation →](/docs/plugins/plugin-editor) |
| 62 | + |
| 63 | +--- |
| 64 | + |
| 65 | +### Kanban Plugin |
| 66 | + |
| 67 | +**[@object-ui/plugin-kanban](/docs/plugins/plugin-kanban)** - Kanban board component with drag-and-drop powered by @dnd-kit. |
| 68 | + |
| 69 | +- Drag and drop cards between columns |
| 70 | +- Column limits (WIP limits) |
| 71 | +- Card badges for status/priority |
| 72 | +- Lazy-loaded (~100-150 KB) |
| 73 | + |
| 74 | +```bash |
| 75 | +npm install @object-ui/plugin-kanban |
| 76 | +``` |
| 77 | + |
| 78 | +[Read full documentation →](/docs/plugins/plugin-kanban) |
| 79 | + |
| 80 | +--- |
| 81 | + |
| 82 | +### Markdown Plugin |
| 83 | + |
| 84 | +**[@object-ui/plugin-markdown](/docs/plugins/plugin-markdown)** - Markdown renderer with GitHub Flavored Markdown support. |
| 85 | + |
| 86 | +- GitHub Flavored Markdown |
| 87 | +- XSS protection |
| 88 | +- Code syntax highlighting |
| 89 | +- Lazy-loaded (~100-200 KB) |
| 90 | + |
| 91 | +```bash |
| 92 | +npm install @object-ui/plugin-markdown |
| 93 | +``` |
| 94 | + |
| 95 | +[Read full documentation →](/docs/plugins/plugin-markdown) |
| 96 | + |
| 97 | +--- |
| 98 | + |
| 99 | +### Object Plugin |
| 100 | + |
| 101 | +**[@object-ui/plugin-object](/docs/plugins/plugin-object)** - Advanced object data management and visualization. |
| 102 | + |
| 103 | +- Object data rendering |
| 104 | +- Complex data structures support |
| 105 | +- Flexible visualization options |
| 106 | + |
| 107 | +```bash |
| 108 | +npm install @object-ui/plugin-object |
| 109 | +``` |
| 110 | + |
| 111 | +[Read full documentation →](/docs/plugins/plugin-object) |
| 112 | + |
| 113 | +--- |
| 114 | + |
| 115 | +## How Plugins Work |
| 116 | + |
| 117 | +### Lazy Loading Architecture |
| 118 | + |
| 119 | +Plugins use React's `lazy()` and `Suspense` to load heavy dependencies on-demand: |
| 120 | + |
| 121 | +```typescript |
| 122 | +// The plugin structure |
| 123 | +import React, { Suspense } from 'react' |
| 124 | +import { Skeleton } from '@object-ui/components' |
| 125 | + |
| 126 | +// Lazy load the heavy implementation |
| 127 | +const LazyEditor = React.lazy(() => import('./MonacoImpl')) |
| 128 | + |
| 129 | +export const CodeEditorRenderer = (props) => ( |
| 130 | + <Suspense fallback={<Skeleton className="w-full h-[400px]" />}> |
| 131 | + <LazyEditor {...props} /> |
| 132 | + </Suspense> |
| 133 | +) |
| 134 | +``` |
| 135 | + |
| 136 | +**Benefits:** |
| 137 | +- **Smaller initial bundle**: Main app loads faster |
| 138 | +- **Progressive loading**: Components load when needed |
| 139 | +- **Better UX**: Loading skeletons while chunks download |
| 140 | +- **Automatic code splitting**: Vite handles chunking |
| 141 | + |
| 142 | +### Bundle Impact |
| 143 | + |
| 144 | +| Plugin | Initial Load | Lazy Load | |
| 145 | +|--------|-------------|-----------| |
| 146 | +| plugin-editor | ~0.2 KB | ~20 KB | |
| 147 | +| plugin-charts | ~0.2 KB | ~540 KB | |
| 148 | +| plugin-kanban | ~0.2 KB | ~100-150 KB | |
| 149 | +| plugin-markdown | ~0.2 KB | ~100-200 KB | |
| 150 | + |
| 151 | +Without lazy loading, all this code would be in your main bundle! |
| 152 | + |
| 153 | +### Auto-Registration |
| 154 | + |
| 155 | +Plugins automatically register their components when imported: |
| 156 | + |
| 157 | +```typescript |
| 158 | +// In the plugin's index.tsx |
| 159 | +import { ComponentRegistry } from '@object-ui/core' |
| 160 | + |
| 161 | +ComponentRegistry.register('code-editor', CodeEditorRenderer) |
| 162 | +``` |
| 163 | + |
| 164 | +You just need to import the plugin once: |
| 165 | + |
| 166 | +```typescript |
| 167 | +// In your App.tsx or main.tsx |
| 168 | +import '@object-ui/plugin-editor' |
| 169 | +import '@object-ui/plugin-charts' |
| 170 | +import '@object-ui/plugin-kanban' |
| 171 | +import '@object-ui/plugin-markdown' |
| 172 | +``` |
| 173 | + |
| 174 | +Now all plugin components are available in your schemas! |
| 175 | + |
| 176 | +## Usage Pattern |
| 177 | + |
| 178 | +All ObjectUI plugins follow the same usage pattern: |
| 179 | + |
| 180 | +```json |
| 181 | +{ |
| 182 | + "type": "plugin-component-name", |
| 183 | + "className": "tailwind-classes", |
| 184 | + "props": { |
| 185 | + // Plugin-specific properties |
| 186 | + } |
| 187 | +} |
| 188 | +``` |
| 189 | + |
| 190 | +### Example: Code Editor |
| 191 | + |
| 192 | +```json |
| 193 | +{ |
| 194 | + "type": "code-editor", |
| 195 | + "language": "typescript", |
| 196 | + "value": "const greeting = 'Hello World';", |
| 197 | + "className": "h-96", |
| 198 | + "theme": "vs-dark" |
| 199 | +} |
| 200 | +``` |
| 201 | + |
| 202 | +### Example: Bar Chart |
| 203 | + |
| 204 | +```json |
| 205 | +{ |
| 206 | + "type": "bar-chart", |
| 207 | + "data": [ |
| 208 | + { "name": "Jan", "value": 400 }, |
| 209 | + { "name": "Feb", "value": 300 }, |
| 210 | + { "name": "Mar", "value": 600 } |
| 211 | + ], |
| 212 | + "dataKey": "value", |
| 213 | + "xAxisKey": "name", |
| 214 | + "height": 300, |
| 215 | + "color": "#8884d8" |
| 216 | +} |
| 217 | +``` |
| 218 | + |
| 219 | +## Features |
| 220 | + |
| 221 | +All ObjectUI plugins share these characteristics: |
| 222 | + |
| 223 | +- ✅ **Lazy Loaded** - Load on-demand, not upfront |
| 224 | +- ✅ **Auto-Register** - Import once, use everywhere |
| 225 | +- ✅ **Type-Safe** - Full TypeScript support |
| 226 | +- ✅ **Schema-Driven** - Define with JSON, not code |
| 227 | +- ✅ **Tailwind CSS** - Use utility classes directly |
| 228 | +- ✅ **Loading States** - Built-in skeletons while loading |
| 229 | +- ✅ **Small Footprint** - Minimal initial bundle impact |
| 230 | + |
| 231 | +## Next Steps |
| 232 | + |
| 233 | +- **[Plugin Concepts](/docs/concepts/plugins)** - Learn how plugins work in detail |
| 234 | +- **[Quick Start Guide](/docs/guide/quick-start)** - Build your first ObjectUI app |
| 235 | +- **[Component Gallery](/docs/components)** - Explore core components |
| 236 | +- **[Schema Rendering](/docs/concepts/schema-rendering)** - Learn how the engine works |
| 237 | + |
| 238 | +## Need Help? |
| 239 | + |
| 240 | +Can't find what you're looking for? Check out: |
| 241 | + |
| 242 | +- [Concepts](/docs/concepts) - Core concepts and architecture |
| 243 | +- [Advanced](/docs/reference) - API documentation and protocol specs |
| 244 | +- [GitHub](https://github.com/objectstack-ai/objectui) - Report issues or contribute |
0 commit comments