Getting started

One framework-neutral core, three ways to use it: Vue 3, Nuxt and React. Same component names, same props.

1. Install

terminal
npm i @ziyarago/ui

Vue 3.5+ or React 18+ is a peer dependency. Install the one you use. Node 18+ for tooling. Using Vite, Tailwind or Next? See Integration.

  • @ziyarago/ui v0.22.6 the components, tokens and Vue, Nuxt and React adapters
  • @ziyarago/ui-mcp v0.22.6 the MCP server for AI coding tools

2. Set up

vue
import { createApp } from 'vue'
import '@ziyarago/ui/style.css'
import ui from '@ziyarago/ui/vue'
import App from './App.vue'

createApp(App).use(ui).mount('#app')

// or import only what you use
// import { UiButton, UiCard } from '@ziyarago/ui/vue'

3. Theme and direction

theme
import { useUiTheme } from '@ziyarago/ui/theme'

const ui = useUiTheme()
ui.setTheme('light')      // dark | light
ui.setPalette('tamam')    // gold | tamam
ui.setLocale('ar')        // dir="rtl" and the Arabic font

The theme is stored in localStorage and written to <html> as data-theme, data-palette and dir. It is safe to call on the server.

4. Connect your AI tool

terminal
npx @ziyarago/ui-mcp init

One command writes .mcp.json, AGENTS.md rules and a Claude skill, so Claude Code, Cursor and others can look up components and props. Details on AI and MCP.

Conventions

  • Controlled inputs: Vue v-model; React modelValue and onChange(value).
  • Slots: Vue named slots (#actions); React props with the same name (actions).
  • Icons are Lucide names (icon="search"). They load from the network by default; self-host with setIconBase('/icons/').
  • CSS classes zg-* and variables --zg-* are public API.

Keep reading