Schema-First UI Generation for Modern Web Apps
zo-ui is a powerful CLI tool that drastically speeds up UI development by generating production-ready components directly from your Zod schemas. Instead of manually writing boilerplate for forms, inputs, and validation logic, you define your data model once, and zo-ui builds the UI for you.
Building forms and UI components for data entry is often repetitive and error-prone:
- You write the database schema or API type.
- You manually create the UI components (inputs, selects, checkboxes).
- You wire up validation logic (which duplicates the schema rules).
- You handle loading states, error messages, and accessibility.
- When the data model changes, you have to update code in 3+ places.
zo-ui treats your Zod schema as the single source of truth.
By introspecting your Zod definitions, it generates high-quality, fully-typed UI components that are ready to drop into your application. It's not just a scaffolding tool—it's a workflow accelerator.
Skip the boilerplate. Generate complex, multi-field forms with validation, labels, and descriptions in seconds. Focus on your app's unique logic, not on typing <input type="text" ... /> for the thousandth time.
The potential output isn't "starter code"—it's code you'd want to write yourself.
- Svelte 5 Support: Leverages the latest Runes syntax for clean, effective reactivity.
- Shadcn UI Integration: Generates components that perfectly match your existing Shadcn design system.
- Accessibility Built-in: Proper ARIA labels, focus management, and semantic HTML.
Since the UI is generated from Zod, your forms are guaranteed to match your data expectations. Validation rules like min, max, email, and regex are automatically translated into frontend validation.
While we love Svelte, zo-ui is built on a pluggable adapter architecture.
- Available Now: Svelte 5 + Shadcn UI
- Available Now: Native HTML + Tailwind
- Coming Soon: React, Vue, Solid
- Define: Create a standard
zodschema file. - Configure (Optional): Tell
zo-uiwhich adapter to use (e.g.,@zo-ui/adapter-shadcn). - Generate: Run the CLI directly from GitHub using
npx.
Create schema.ts:
import { z } from 'zod';
export const UserSchema = z.object({
name: z.string().describe('Full Name'),
email: z.string().email().describe('Email Address'),
role: z.enum(['admin', 'user', 'guest']).default('user').describe('User Role'),
bio: z.string().max(500).describe('Short Bio').optional()
});Run the generator directly using npx with your GitHub repository path (replace username/zo-ui with your actual repo path):
npx @zo-ui/cli generate --schema ./schema.ts --adapter shadcn-svelte --output ./src/lib/componentsIf your schema exports UserSchema, you'll get a fully functional UserSchema.svelte ready to use!
Scaffolds UI components from a schema.
-s, --schema <path>: Path to the Zod schema file (required).-a, --adapter <name>: The UI adapter to use (default:shadcn-svelte).-o, --output <path>: Directory where components will be generated (default:src/lib/components).
Checks if a schema file is valid and readable by the parser.
npx @zo-ui/cli validate ./schema.ts