Getting Started

Install useVyre, import the styles, and start building - in React or Vue. Your AI agent will know exactly what to generate.


Installation

npm install @usevyre/tokens @usevyre/react
# or
pnpm add @usevyre/tokens @usevyre/react

Setup

Import the tokens CSS and component styles once at your app entry point.

// main.tsx or your entry file
import "@usevyre/tokens/css";        // ← design tokens
import "@usevyre/react/styles";      // ← component styles

import { Button, Badge, Card } from "@usevyre/react";

Usage

import { Button, Badge, Card, CardBody } from "@usevyre/react";
import { ToastProvider, useToast } from "@usevyre/react";

// Wrap your app with ToastProvider
function App() {
  return (
    <ToastProvider>
      <MyPage />
    </ToastProvider>
  );
}

function MyPage() {
  const { toast } = useToast();

  return (
    <Card variant="elevated">
      <CardBody>
        <Badge variant="success">Live</Badge>
        <Button
          variant="accent"
          onClick={() => toast({ title: "Saved!", variant: "success" })}
        >
          Save changes
        </Button>
      </CardBody>
    </Card>
  );
}

Set up AI context

The real power of useVyre is the AI context file. Add it to your project's agent rules so your coding agent knows every valid prop and variant.

Why this matters: Without context, AI agents invent props that don't exist. With it, they generate correct, type-safe component code on the first try.
# Add to CLAUDE.md, .cursor/rules, or AGENTS.md
# (auto-generate with: npx @usevyre/ai-context init --claude)

$(cat node_modules/@usevyre/tokens/dist/ai-context.md)

Or manually copy the contents of node_modules/@usevyre/tokens/dist/ai-context.md into your agent rules file.