This example demonstrates the three specialized designer modes in Object UI:
Optimized for building forms with validation and field management.
- Components: Form fields, buttons, basic layout
- Branding: Emerald/Teal
- Use Case: Creating contact forms, registration forms, data entry forms
Optimized for designing page layouts and structures.
- Components: Containers, grids, navigation, content
- Branding: Blue/Indigo
- Use Case: Creating page structures, dashboards, landing pages
Full-featured designer with all available components.
- Components: All 30+ components
- Branding: Purple/Pink
- Use Case: Any UI design task requiring maximum flexibility
# Install dependencies (from root)
pnpm install
# Run the example
cd examples/designer-modes
pnpm devThe application will start at http://localhost:5173
- Mode Switching: Toggle between the three designer modes using the top navigation
- Live Preview: See your changes in real-time as you design
- Schema Export: Check the console to see the generated schema JSON
- Persistence: Switch modes while maintaining your design (uses the same schema)
- Start with a Mode: Choose Form Designer for forms, Layout Designer for page structures, or General Designer for everything
- Drag Components: Drag components from the left panel to the canvas
- Configure Properties: Select a component and edit its properties in the right panel
- Switch Modes: Try switching between modes to see different component sets
- Export Schema: The schema is logged to the console on every change
import { Designer } from '@object-ui/designer';
function App() {
const [mode, setMode] = useState('general');
return (
<Designer
mode={mode}
onSchemaChange={(schema) => console.log(schema)}
/>
);
}