The official VSCode extension for Object UI - the universal schema-driven UI engine.
Beautiful syntax highlighting for Object UI JSON schemas with intelligent color coding for component types, properties, and values.
- Smart auto-completion for component types
- Context-aware property suggestions
- Tailwind CSS class hints
- Snippet support for common patterns
- Real-time JSON validation
- Type-specific property validation
- Accessibility warnings
- Best practice recommendations
- Instant visual preview of your schemas
- Side-by-side editing and preview
- Auto-refresh on save
- Error highlighting
- Export schemas to React components
- Format schemas with proper indentation
- Create new schemas from templates
- Code snippets for rapid development
- Open VSCode
- Press
Ctrl+P/Cmd+P - Type
ext install objectui.object-ui - Press Enter
# Clone the repository
git clone https://github.com/objectstack-ai/objectui.git
cd objectui/packages/vscode-extension
# Install dependencies
pnpm install
# Build the extension
pnpm build
# Package the extension
pnpm package
# Install the .vsix file in VSCode
code --install-extension object-ui-*.vsix- Create a new file with extension
.objectui.jsonor.oui.json - Start typing and enjoy IntelliSense suggestions
- Preview by clicking the preview icon in the editor toolbar
- Export to React when ready for production
Create a file app.objectui.json:
{
"type": "div",
"className": "p-6",
"body": {
"type": "card",
"title": "Hello Object UI",
"body": {
"type": "text",
"content": "This is a schema-driven UI!"
}
}
}Press the preview button to see it live!
Type these prefixes and press Tab to insert code snippets:
| Prefix | Description |
|---|---|
oui-empty |
Empty schema template |
oui-form |
Complete form with inputs |
oui-card |
Card component |
oui-input |
Input field |
oui-textarea |
Textarea field |
oui-button |
Button component |
oui-text |
Text component |
oui-grid |
Grid layout |
oui-flex |
Flex layout |
oui-dashboard |
Dashboard template |
oui-container |
Container with max-width |
oui-separator |
Horizontal separator |
Access these commands via the Command Palette (Ctrl+Shift+P / Cmd+Shift+P):
- Object UI: Open Preview - Open preview in current column
- Object UI: Open Preview to the Side - Open preview side-by-side
- Object UI: Validate Schema - Validate the current schema
- Object UI: Format Schema - Format with proper indentation
- Object UI: Export to React Component - Generate React component code
- Object UI: Create New Schema - Create from template
Customize the extension behavior in VSCode settings:
{
// Preview settings
"objectui.preview.port": 3000,
"objectui.preview.autoRefresh": true,
// Validation settings
"objectui.validation.enabled": true,
// Completion settings
"objectui.completion.enabled": true,
// Formatting settings
"objectui.format.indentSize": 2
}The extension automatically activates for:
*.objectui.json- Dedicated Object UI schemas*.oui.json- Short form schemasapp.json- Common schema filename
# Install dependencies
pnpm install
# Build the extension
pnpm build
# Watch mode for development
pnpm dev# Run tests
pnpm test
# Run tests in watch mode
pnpm test:watch# Create .vsix package
pnpm package
# Publish to marketplace (requires publisher account)
pnpm publishWe welcome contributions! Please see our Contributing Guide for details.
Found a bug? Have a feature request? Open an issue on GitHub.
MIT License - see LICENSE for details.
Built with:
Made with ❤️ by the Object UI Team