# VLLNT UI - Full Reference > One-fetch, complete agent context for the VLLNT UI registry. 225 components, install via shadcn CLI against /r/.json. Site: https://ui.vllnt.ai ## Install ```bash pnpm dlx shadcn@latest add https://ui.vllnt.ai/r/.json # Or with npm: npx shadcn@latest add https://ui.vllnt.ai/r/.json ``` ## Installation Source: https://ui.vllnt.ai/docs/installation # Installation VLLNT UI ships as both an npm package and a shadcn-compatible registry. Most teams should install individual components from the registry so the source lands in their app and can be adapted locally. ## Prerequisites - Node.js 20 or newer. - pnpm for this repository and for examples in this documentation. - A React application with TypeScript. - Tailwind CSS configured in the application. ## Install the package Use the package when you want to import prebuilt exports from `@vllnt/ui`: ```bash pnpm add @vllnt/ui ``` Then import the full package stylesheet once from your app entry, such as `app/layout.tsx` or `src/main.tsx`: ```tsx import "@vllnt/ui/styles.css"; ``` Add the VLLNT UI Tailwind preset and keep your application source in Tailwind content scanning: ```ts // tailwind.config.ts import uiPreset from "@vllnt/ui/tailwind-preset"; export default { presets: [uiPreset], content: ["./app/**/*.{ts,tsx}", "./src/**/*.{ts,tsx}", "./components/**/*.{ts,tsx}"], }; ``` Then import a component: ```tsx import { Button } from "@vllnt/ui"; export function SaveButton() { return ; } ``` ## Add a registry component Use the shadcn CLI when you want the component source copied into your project: ```bash pnpm dlx shadcn@latest add https://ui.vllnt.ai/r/button.json ``` Replace `button` with any component slug from the [component index](/components). ## Tailwind setup Package installs and registry installs need slightly different setup: - Package installs import `@vllnt/ui/styles.css` once, use `@vllnt/ui/tailwind-preset`, and scan your app source files in `content`. - Registry installs copy component source into your app. Keep Tailwind configured for your app styles, and make sure Tailwind content scanning includes the destination paths where the shadcn CLI writes those copied components. ```ts // tailwind.config.ts export default { content: [ "./app/**/*.{ts,tsx}", "./src/**/*.{ts,tsx}", "./components/**/*.{ts,tsx}", "./registry/**/*.{ts,tsx}", ], }; ``` The exact registry paths depend on your shadcn `components.json` aliases. Include whichever local directories receive copied VLLNT UI components. Use `@vllnt/ui/themes/default.css` instead of `@vllnt/ui/styles.css` only when you intentionally want the package theme variables without Tailwind base layer styles. The theme file is variables-only; it is not a substitute for the full package stylesheet. Keep registry-generated utility classes intact unless you know the rendered states no longer need them. ## First component checklist - Install one small component, such as `button` or `badge`. - Import it from the copied local path or from `@vllnt/ui`, depending on your chosen install mode. - Render it in a page with light and dark mode enabled. - Run your app lint and typecheck before adding more components. ## CLI Source: https://ui.vllnt.ai/docs/cli # CLI The VLLNT UI registry uses the same JSON descriptor shape expected by the shadcn CLI. You can install components directly from public URLs without adding a custom package dependency. ## Add one component ```bash pnpm dlx shadcn@latest add https://ui.vllnt.ai/r/button.json ``` The CLI reads the descriptor, installs dependencies, and writes source files into your configured component directory. ## Add multiple components Install components one at a time so diffs are easy to review: ```bash pnpm dlx shadcn@latest add https://ui.vllnt.ai/r/dialog.json pnpm dlx shadcn@latest add https://ui.vllnt.ai/r/toast.json pnpm dlx shadcn@latest add https://ui.vllnt.ai/r/form.json ``` ## Inspect the registry first Use the registry index when scripting: ```bash curl https://ui.vllnt.ai/r/registry.json ``` Each item includes its slug, title, description, category, dependencies, and file list. Per-component descriptors live at: ```text https://ui.vllnt.ai/r/.json ``` ## Team workflow - Pin component additions in pull requests instead of installing during deployment. - Review generated files like normal application code. - Keep local edits close to the copied component so future updates are easy to reconcile. - Re-run the CLI only when you intentionally accept upstream changes. ## Custom registries If you build a private registry on top of VLLNT UI, keep the same descriptor fields and stable URL shape. Consumers should be able to swap only the host: ```bash pnpm dlx shadcn@latest add https://your-registry.example.com/r/button.json ``` ## Theming Source: https://ui.vllnt.ai/docs/theming # Theming VLLNT UI components are styled with Tailwind utilities that read semantic CSS variables. The goal is to keep component source portable while allowing each application to define its own brand surface. ## Token model Use semantic tokens for component intent: - `background` and `foreground` for page surfaces. - `card` and `card-foreground` for contained panels. - `primary`, `secondary`, `muted`, and `accent` for interaction states. - `border`, `input`, and `ring` for control chrome. - `destructive` for destructive actions. Avoid hard-coding product colors inside component internals. Prefer mapping brand color decisions into variables once. ## Dark mode Use a class-based dark mode strategy so server-rendered markup and client hydration agree: ```tsx {children} ``` The site uses `ThemeProvider` for the registry app, but copied components only need the variables and Tailwind utilities available in their host application. ## Custom themes Define theme variables at the application boundary: ```css :root { --background: 0 0% 100%; --foreground: 240 10% 3.9%; --primary: 240 5.9% 10%; --primary-foreground: 0 0% 98%; } .dark { --background: 240 10% 3.9%; --foreground: 0 0% 98%; } ``` Keep custom themes semantic. If a component needs a new recurring intent, add a token for the intent instead of scattering one-off utility colors. ## Motion and density Components should remain usable in dense product surfaces. Use motion to communicate state changes, not as decoration. Respect `prefers-reduced-motion` when adding new animation. ## Registry Source: https://ui.vllnt.ai/docs/registry # Registry The public registry is the machine-readable contract behind the component site. It exposes a top-level index and one descriptor per component. ## Endpoints - `/r/registry.json` lists every component and registry-level metadata. - `/r/.json` returns the install descriptor for a single component. - `/components/` is the human documentation page for the same component. ## Item shape Registry items include: - `name`: stable slug used in URLs. - `title`: human-readable component name. - `description`: short summary for search, agents, and docs. - `type`: registry item kind. - `category`: component category. - `files`: source files installed by the CLI. - `dependencies`: npm dependencies required by the component. - `registryDependencies`: other registry components needed at runtime. - `version` and `stability`: release metadata stamped during registry build. ## Building on top A compatible registry should keep stable component slugs, serve JSON with cache-friendly URLs, and preserve the `files` contract expected by the shadcn CLI. If you wrap VLLNT UI in a private registry, keep your custom metadata additive so standard tooling can still read the descriptor. ## Generated files The registry app generates shims and metadata from the package source. Do not hand-edit generated output. Change the source component, then run the documented registry build or shim sync script. ## Agent usage Agents should prefer `/r/registry.json` for discovery and `/r/.json` for implementation details. Use `/llms-full.txt` when a single text context is easier than fetching many JSON endpoints. ## Components Source: https://ui.vllnt.ai/docs/components # Components VLLNT UI components are designed as accessible primitives for real application surfaces. Each component should expose predictable DOM, semantic state, and enough composition hooks to fit product workflows. ## Anatomy Most components live under: ```text packages/ui/src/components// ``` Common files include: - `.tsx` for source. - `.test.tsx` for Vitest coverage. - `.stories.tsx` for Storybook examples. - `.visual.tsx` for component-test screenshots when applicable. - `index.ts` for exports. ## Composition Prefer explicit subcomponents when a component has multiple regions. Keep root elements semantic: dialogs are dialogs, lists are lists, navigation is navigation, and controls expose native button or input behavior whenever possible. ## Accessibility Every interactive component should support keyboard operation, visible focus, ARIA only where native semantics are not enough, and stable labels for assistive technology. Components built on Radix primitives should preserve the primitive's accessibility contract. ## Testing Tests should cover rendering, prop forwarding, key interactions, and accessibility-critical state. When a component persists state or listens to browser events, include regression tests for storage and event behavior. ## Registry copies Registry files are generated from package source. Fix source first, then regenerate the registry output instead of editing `apps/registry/registry/default` by hand. ## Agents Source: https://ui.vllnt.ai/docs/agents # Agents VLLNT UI exposes agent-readable surfaces so coding agents can discover components, inspect install contracts, and cite current documentation without scraping the rendered site. ## llms.txt Use `/llms.txt` for a compact overview of the registry. It includes install guidance, core docs links, and component links grouped by category. ```text https://ui.vllnt.ai/llms.txt ``` ## llms-full.txt Use `/llms-full.txt` when the agent needs one larger text context. It includes the main docs pages and component metadata summaries. ```text https://ui.vllnt.ai/llms-full.txt ``` ## Registry JSON Use `/r/registry.json` for discovery and `/r/.json` for exact install descriptors. JSON is the most reliable source for file paths, dependencies, and registry dependencies. ## MCP The `/mcp` route is reserved for agent workflows that need a structured protocol endpoint. Treat registry JSON as the canonical install contract and MCP as an integration surface. ## Safe agent workflow - Fetch `/llms.txt` for orientation. - Fetch `/r/registry.json` to choose components. - Fetch individual `/r/.json` descriptors before editing code. - Prefer package source over generated registry files when contributing upstream. - Run the project gates before opening a PR. ## Contributing Source: https://ui.vllnt.ai/docs/contributing # Contributing The repository is a pnpm and Turborepo workspace. The package source lives in `packages/ui`, and the registry/docs site lives in `apps/registry`. ## Setup ```bash pnpm install --frozen-lockfile ``` Use pnpm only. Do not use npm, yarn, or bun for workspace commands. ## Local dev loop Useful commands from the repo root: ```bash pnpm -F @vllnt/ui lint pnpm -F @vllnt/ui exec tsc --noEmit --project tsconfig.build.json pnpm build pnpm test:once pnpm check:circular ``` Run narrower tests while developing, then run the full gates before opening or updating a PR. ## Stories Stories should demonstrate realistic states, not only default rendering. Include disabled, loading, empty, error, and long-content states when those states exist. ## Registry output Do not hand-edit generated registry files. Update source files under `packages/ui/src/components`, then regenerate registry output through the documented scripts. ## Pull requests Every PR should link an issue, keep the body aligned with the current head, and include validation evidence. Keep unrelated refactors out of feature PRs so review can focus on the issue being closed. ## Changelog Source: https://ui.vllnt.ai/docs/changelog # Changelog This page includes the repository and package changelogs at build time. The published package changelog remains the source for package-level release notes, while the root changelog tracks site, registry, CI, and agent-surface changes. ## Sources - Root `CHANGELOG.md`: repo-wide changes and current release target. - `packages/ui/CHANGELOG.md`: published `@vllnt/ui` package changes. - GitHub Releases: release artifacts and announcement notes. ## Current generated changelog ## FAQ Source: https://ui.vllnt.ai/docs/faq # FAQ ## What license does VLLNT UI use? The project is released under the repository license. Check `LICENSE` in the repo for the canonical license text. ## Is this a package or a shadcn registry? Both. You can import from `@vllnt/ui`, or you can copy component source into your app with the shadcn CLI and `/r/.json` descriptors. ## What are the peer dependencies? React, React DOM, Tailwind CSS, and Radix primitives are the important runtime expectations. Individual registry descriptors list their npm dependencies. ## Does it support React Server Components? Components that use hooks or browser APIs are client components. Server-safe exports can be rendered from server components, but interactive components should keep their `"use client"` directive. ## Does it support Tailwind v4? The registry site uses Tailwind-compatible utility classes and semantic variables. Check component source and your app's Tailwind setup when copying components into a Tailwind v4 project. ## Can I customize component source? Yes. Registry installation copies source into your app. Keep changes local, and re-run the CLI only when you intentionally reconcile upstream updates. ## Are components accessible? Accessibility is a core requirement. Components use native semantics and Radix primitives where appropriate, and tests cover important roles and interactions. ## How do I report a bug? Use the report link on the component page or open a GitHub issue with reproduction details, expected behavior, and environment information. ## Can AI agents use the registry? Yes. Use `/llms.txt`, `/llms-full.txt`, `/r/registry.json`, and `/r/.json` for agent-friendly context. ## How often is the registry updated? The registry is rebuilt during site deployment. Registry JSON includes version and generated metadata so consumers can compare changes. ## Design Guide Source: https://ui.vllnt.ai/design Raw: https://ui.vllnt.ai/DESIGN.md Tokens: https://ui.vllnt.ai/r/design.json # DESIGN.md > Single source of truth for VLLNT UI's brand and design conventions. > Humans read this file. Agents read it too — every UI suggestion must follow it. This is the **canonical** brand & design guideline for the library. Read it on the web at three public surfaces, all generated from this one file: - [`/DESIGN.md`](https://ui.vllnt.ai/DESIGN.md) — this file as raw markdown (canonical for agents). - [`/design`](https://ui.vllnt.ai/design) — human-browsable rendering with a contents nav. - [`/r/design.json`](https://ui.vllnt.ai/r/design.json) — machine-readable token set. The full token set lives in `packages/design/tokens.json` and is documented in `packages/design/README.md`. --- ## 1. Brand | Attribute | Value | |-----------|-------| | Name | **VLLNT UI** (always two words, both capitalised) | | Voice | Direct. No marketing fluff. Short sentences. | | Mission | Agent-first React components — copy-paste, you own them. | | Tone | Confident, technical, honest about tradeoffs. | **Voice rules** - Sentence case for headings, button labels, tooltips. Title Case only for proper nouns. - Avoid superlatives ("the best", "blazingly fast"). State facts. - Avoid em-dash chains. One per sentence max. - Use `…` (ellipsis glyph), not `...`. - No emoji in shipped UI. Lucide icons handle anything visual. **Banned phrases** - "Click here" - "Submit" as a button label (use the verb of the action) - "Loading…" without a context noun ("Loading components…") - "Sign up to learn more" --- ## 2. Logo `VLLNT UI` set in the system font stack at the brand weight. There is no standalone wordmark file; the type itself is the mark. **Clear space** — at minimum, height of the cap-height of the logotype. **Min size** — 14px equivalent. Below that, omit "UI" and show only "VLLNT". **Misuse** — never stretch, recolor, italicise, or add a tagline beneath. --- ## 3. Color Tokens live as CSS variables in `packages/ui/themes/default.css`. Components **always** consume tokens — never raw hex. The token set is versioned with the library. Machine clients use `packages/design/tokens.json`. The JSON schema is documented in `packages/design/tokens.schema.json` and groups tokens by color, typography, spacing, radius, elevation, motion, and iconography. ### Semantic tokens (consumer-facing) | Token | Light role | Dark role | |-------|------------|-----------| | `--background` | Surface | Surface | | `--foreground` | Primary text | Primary text | | `--muted` | Subtle surface | Subtle surface | | `--muted-foreground` | Secondary text | Secondary text | | `--border` | Hairline divider | Hairline divider | | `--ring` | Focus ring | Focus ring | | `--accent` / `--accent-foreground` | Active / hover surface | Same | | `--destructive` / `--destructive-foreground` | Danger surface / text | Same | ### Anti-patterns - **Never** use `bg-black` / `text-white` / `bg-white`. Use `bg-background` / `bg-foreground` / `text-foreground` so dark mode works. - **Never** use `bg-gray-500` / Tailwind palette literals. Pick a semantic token. - **Pure black** (`#000`) is banned for backgrounds — use `--background`. ### Contrast WCAG **AA** minimum. Body text against any surface ≥ **4.5:1**, large text ≥ **3:1**, non-text UI ≥ **3:1**. The default theme passes; new themes must verify before merging. --- ## 4. Typography | Token | Size | Weight | Line height | |-------|------|--------|-------------| | Display (H1) | 3rem (48px) | 600 (semibold) | 1.1 | | H2 | 2rem (32px) | 600 | 1.2 | | H3 | 1.5rem (24px) | 600 | 1.25 | | H4 | 1.25rem (20px) | 600 | 1.3 | | Body large | 1.125rem (18px) | 400 | 1.6 | | Body | 1rem (16px) | 400 | 1.6 | | Body small | 0.875rem (14px) | 400 | 1.5 | | Caption | 0.75rem (12px) | 500 | 1.4 | | Code | inherit | 400 mono | 1.5 | **Rules** - Headings use `font-semibold` (600), **never** `font-bold` (700+) at display sizes — letter shapes crush. - Code uses the system mono stack via `font-mono`. - Tabular numerals for data tables, charts, transactions: `font-variant-numeric: tabular-nums`. --- ## 5. Spacing 4-pt scale. Tailwind classes map 1:1. | Token | Value | Use | |-------|-------|-----| | `space-1` | 4px | Icon padding | | `space-2` | 8px | Tight stack, inline gap | | `space-3` | 12px | Comfortable inline gap | | `space-4` | 16px | Default block stack | | `space-6` | 24px | Section break | | `space-8` | 32px | Major section | | `space-12` | 48px | Page section | | `space-16` | 64px | Hero / landing block | **Rules** - Stay on the scale. Never `gap-[7px]` etc. - One axis at a time on flex children — use `gap-y-N` or `gap-x-N`, not `gap-N` when only one axis is needed. --- ## 6. Radius | Token | Value | |-------|-------| | `radius-none` | 0 | | `radius-sm` | 4px | | `radius-md` | 8px (default) | | `radius-lg` | 12px | | `radius-full` | 9999px | Cards, popovers, dialogs use `radius-md`. Pills, avatars use `radius-full`. Long surfaces (panels, sheets) use `radius-lg`. --- ## 7. Elevation Use sparingly. Most components are flat with `border` + `bg-background`. | Token | Value | |-------|-------| | `shadow-none` | none | | `shadow-sm` | `0 1px 2px rgba(0,0,0,0.05)` | | `shadow-md` | `0 4px 6px -1px rgba(0,0,0,0.1)` | | `shadow-lg` | `0 10px 15px -3px rgba(0,0,0,0.1)` (popovers, dialogs) | No coloured shadows. No multi-layered glow effects. --- ## 8. Motion **Principles** 1. **Purposeful** — every animation must explain a state change. No decoration. 2. **Fast** — under 200ms unless the motion communicates distance or volume. 3. **Subtle** — translate < 8px, scale ±2%. No bounces (`spring` easings strip fidelity at small distances). | Token | Duration | Easing | Use | |-------|----------|--------|-----| | `duration-fast` | 100ms | `ease-out` | Micro-interactions (button press) | | `duration-base` | 200ms | `ease-out` | Open / close, hover, focus | | `duration-slow` | 300ms | `ease-in-out` | Layout shifts, modal entry | `prefers-reduced-motion` — when `reduce`, durations collapse to 1ms or motion is skipped entirely. **Banned** - Bounce easings (`cubic-bezier(0.68, -0.55, 0.265, 1.55)`). - Auto-playing entrance animations on initial page load (jarring). - `animation: spin` on anything except a true loading spinner. --- ## 9. Iconography - **Library**: `lucide-react` (only). Match its line-art aesthetic. - **Default size**: 16px (`h-4 w-4`). - **Stroke**: 2px (lucide default). - **Color**: inherits `currentColor`. Don't hardcode. - **Spacing**: 8px (`gap-2`) between icon and adjacent text. --- ## 10. Component patterns | Use | Pattern | |-----|---------| | Inline action | `Button` | | Single binary choice | `Switch` | | One of N | `Select` (≤ 8 options) or `Combobox` (> 8 / searchable) | | Many of N | `MultiSelect` | | Free text | `Input` (single line) or `Textarea` | | Confirmation | `AlertDialog` (destructive) or `Dialog` (informational) | | Side panel | `Sheet` | | Hover help | `Tooltip` (≤ 80 chars) | | Stepper / wizard | `Stepper` + `MultiStepForm` | | Tabular data | `DataTable` | | Hierarchical data | `TreeView` | | Status chip | `Badge` | | Notification (transient) | `Toast` | | Notification (persistent) | `Banner` | | Empty state | `EmptyState` | **Anti-patterns** - `
` — always use `Button` for click semantics. - Tooltips on disabled buttons — wrap in a `` with `aria-disabled` instead, since browsers swallow events on `disabled` elements. - Modal-on-modal — restructure the flow. - Polymorphic children + items props on the same component — pick one. --- ## 11. Accessibility (WCAG AA minimum) - Every interactive element is keyboard-reachable. - Focus rings visible (`--ring` token), never `outline-none` without a replacement. - Form inputs always labelled (`