Getting Started
Zeus Web supports three usage paths:
CLI registry source
Copy editable React or Vue source into your app with zweb init and zweb add.
Native styled Web Components
Use @zeus-web/ui when you want styled custom elements without React or Vue.
Advanced primitives
Install per-component primitives when building your own design system.
React or Vue app
Initialize the project:
bash
pnpm dlx @zeus-web/cli initThis creates:
txt
zeus-ui.json
src/lib/cn.ts
src/styles/zeus.cssAdd components:
bash
pnpm dlx @zeus-web/cli add button inputThis copies React files into your project:
txt
src/components/ui/button.tsx
src/components/ui/input.tsxFor Vue projects, the CLI copies:
txt
src/components/ui/button.vue
src/components/ui/input.vueReact usage
tsx
import { Button } from '@/components/ui/button'
import { Input } from '@/components/ui/input'
export function Example() {
return (
<form className="space-y-4">
<Input placeholder="Email" type="email" />
<Button variant="primary">Submit</Button>
</form>
)
}Vue usage
vue
<script setup lang="ts">
import Button from '@/components/ui/button.vue'
import Input from '@/components/ui/input.vue'
</script>
<template>
<form class="space-y-4">
<Input placeholder="Email" />
<Button variant="primary">Submit</Button>
</form>
</template>Native styled Web Components
Install:
bash
pnpm add @zeus-web/uiImport the aggregate entry:
ts
import '@zeus-web/ui'Use custom elements:
html
<zw-button variant="primary">Save</zw-button>
<zw-input placeholder="Email"></zw-input>Per-component imports:
ts
import '@zeus-web/ui/button'
import '@zeus-web/ui/input'Advanced primitive usage
Install a primitive:
bash
pnpm add @zeus-web/buttonReact wrapper:
tsx
import { Button } from '@zeus-web/button/react'
export function Example() {
return <Button>Save</Button>
}Vue wrapper:
vue
<script setup lang="ts">
import { Button } from '@zeus-web/button/vue'
</script>
<template>
<Button>Save</Button>
</template>Native primitive:
ts
import '@zeus-web/button/wc/auto'html
<zw-button>Save</zw-button>Next
- Learn the three usage modes in Usage Modes.
- Learn CLI options in CLI.
- Learn source registry internals in Registry.
- Learn native usage in Native Web Components.