# Ignix UI - AI Agent Reference This file is the single source of truth for any AI coding agent working with Ignix UI - whether or not MCP is configured. Read this before generating code or running commands. ## Two Ways An Agent Can Use Ignix ### A. Direct CLI - works everywhere, no setup, no API key, no MCP required If you have shell access (Claude Code, Cursor's agent mode, Codex, or any terminal), drive Ignix entirely through its command line. Every list/install/diagnostic command supports `--json` for structured, parseable output - no scraping colored terminal text. ### B. MCP Tools - if the Ignix MCP server is configured in your client If you're inside an MCP-aware client (Cursor, Claude Desktop, VS Code Copilot, Windsurf) with `ignix mcp init` already run, these tools are available directly instead of shelling out: `create_react_project`, `list_components`, `add_component`, `generate_template`, `validate_ignix_only`, `get_component_docs`. They are thin wrappers around the same CLI commands documented below - reach for whichever is available, and default to the direct CLI when unsure, since it always works. ## Project Structure (monorepo) This repository is a pnpm/Turborepo monorepo. Know what lives where before making changes: - `packages/cli-tool` - the `ignix` CLI itself (`@mindfiredigital/ignix-cli`). Commands live in `src/commands/`, business logic in `src/services/` (RegistryService, ComponentService, ThemeService, TemplateService, DependencyService). - `packages/registry` - the source of truth for every installable component/theme/template. `registry.json` and `themes.json` are the manifests; the actual component source files live alongside them (e.g. `components/accordion/index.tsx`). The CLI fetches from here (or from the raw GitHub URLs configured in `ignix.config.js`) and copies files into the user's project - this is a copy-the-source model (like shadcn/ui), not an npm-import-only model. - `packages/cli` - the published component library package (`@mindfiredigital/ignix-ui`), containing the theme engine (`src/themes`) and shared types. - `packages/ignix-mcp-server` - the MCP server (`@mindfiredigital/ignix-mcp-server`) that exposes the tools listed in section B above to MCP-aware clients. - `apps/docs` - the public documentation site (Docusaurus). - `apps/storybook` - Storybook previews mirroring every component in `packages/registry`; useful for seeing a component's variants/props in isolation if `ignix info`/registry description isn't detailed enough. ## Design System and Theming All Ignix UI components consume global HSL design tokens declared in standard CSS stylesheets. ### CSS Custom Properties - `--background`: Base background color. - `--foreground`: High-contrast body text. - `--border`: Outer and inline boundary separation lines. - `--muted`: Secondary background fill colors. - `--muted-foreground`: Lower contrast captions and annotations. ### Theme Selectors Components adapt theme colors through class hierarchy: - **Light Mode:** Default styles. - **Dark Mode:** Governed by parent element containing the `dark` class or `data-theme="dark"` attribute. ## Shared Component APIs and Patterns Many Ignix UI components implement standardized props for layout, resizing, and theme handling: - `themeMode`: `'light' | 'dark'` (explicit theme mode overriding). - `size`: `'sm' | 'md' | 'lg' | 'xl'` (controls padding, height, and font sizes). - `disabled`: `boolean` (disables interactions and applies muted styles). - `className`: `string` (standard Tailwind CSS class extension). ### Key Component-Specific Props - **Button:** - `variant`: `'default' | 'primary' | 'secondary' | 'success' | 'warning' | 'danger' | 'outline' | 'ghost' | 'link' | 'subtle' | 'elevated' | 'glass' | 'neon'` - `asChild`: `boolean` (renders child component using Radix Slot) - `animationVariant`: `'none' | 'hover' | 'press' | 'press3D' | 'press3DSoft'` - **Input & Textarea:** - `variant`: `'default' | 'clean' | 'springy' | 'underline' | 'floating' | 'borderBeam' | 'premiumGradient' | 'particleField' | 'typewriter' | 'morph' | 'spotlight'` - `error`: `boolean` / `errorMessage`: `string` - `success`: `boolean` / `successMessage`: `string` - `icon`: `React.ReactNode` (leading icon) - **DatePicker:** - `variant`: `'single' | 'range'` - `format`: `DateFormat` (e.g. `'MM/DD/YYYY'`, `'YYYY-MM-DD'`) - `minDate` / `maxDate`: `Date` - `popupPosition`: `'bottom-left' | 'bottom-right' | 'top-left' | 'top-right' | 'left' | 'right'` - **Hero:** - `variant`: `'default' | 'visual' | 'split' | 'glassmorphism' | 'interactive'` - `animate`: `boolean` (enables entrance motion effects) ## Component Catalog by Category Ignix UI includes 54 modular components grouped by feature area: ### 1. Navigation and Structure - **Navbar (`navbar`):** Navigation bar with desktop menus and responsive mobile drop-downs. - **Sidebar (`sidebar`, `threecolumnsidebar`):** Collatable panels with nested link lists and active state tracking. - **Floating Dock (`floating-dock`):** Floating navigation bar with hover-scaling elements. - **Breadcrumbs (`breadcrumbs`):** Inline path hierarchy markers. - **Pagination (`pagination`):** Page selectors with previous/next triggers. - **Stepper (`stepper`):** Progress tracking for multi-step processes. ### 2. Layout and Spacing - **Container (`container`):** Layout wrappers with maxWidth constraints. - **Spacer (`spacer`):** Fixed height/width blocks for layout gaps. - **Scroll Area (`scroll-area`):** Custom styled scrollable viewports. - **Aspect Ratio (`aspectratio`):** Proportional content box wrappers. ### 3. Data Entry and Controls - **Button (`button`, `button-group`, `button-with-spinner`, `buttonwithicon`):** Trigger controls with active micro-animations. - **Input (`input`, `exploding-input`, `textarea`):** Text input controls with floating labels and hover highlight transitions. - **DatePicker (`date-picker`):** Single date and dual-range calendar selector with error-showing logic. - **Dropdown (`dropdown`):** Option selectors with checkbox and separator support. - **Checkbox (`checkbox`), Radio (`radio`), Switch (`switch`):** Checkable boolean selections. - **Slider (`slider`):** Numerical range select sliders. - **Rating (`rating`):** Star selection controls. - **File Upload (`file-upload`):** Drag and drop file select controls. ### 4. Data Display and Layouts - **Typography (`typography`):** Heading, body, and caption text wrappers. - **Card (`card`, `product-card`, `image-card`, `user-card`, `testimonial-card`):** Structured content boxes. - **Table (`table`, `advanced-table`, `comparison-table`, `pricing-grid`):** Grid layouts for structured data, sorting, and comparison matrixes. - **Accordion (`accordion`):** Vertically stacked collapsible panels. - **Carousel (`carousel`):** Slide transition galleries. - **Badge (`badge`):** Small label indicators. - **Avatar (`avatar`):** Circular image wrappers with fallback initials. - **Tabs (`tab`):** Tabbed content switcher panels. - **List (`list-basic`, `list-with-actions`, `list-with-avatars`, `list-with-status`):** Various list layouts for displaying text, actions, user avatars, and status markers. - **Lazy Load (`lazyload`):** Image and content placeholders with viewport intersection observer loading. ### 5. Overlays and Feedback - **Modals & Dialogs (`modals`, `dialogbox`, `drawer`):** Modal windows and slide-out side drawers. - **Toast (`toast`):** Dismissible floating notification system. - **Tooltip (`tooltip`):** Contextual popup labels on hover. - **Progress Indicator (`progress-indicator`):** Linear loading bars. - **Spinner (`spinner`):** Inline rotating load indicators. ### 6. Page Sections - **Hero (`hero`):** Large header section templates with headings, media, actions, and features. ## Core Rules - Do's and Don'ts DO - Use React + TypeScript for every component and page. - Style exclusively with Tailwind CSS utility classes (`className="..."`). - Import installed components via the `@ignix-ui` path alias that `ignix init` configures: `import { Accordion } from '@ignix-ui/accordion'` (maps to `src/components/ui/accordion`). - Wrap the app in `` from `./themes/ThemeProvider` after init. - Use the `cn()` helper (`src/utils/cn.ts`) for conditional classNames. - Confirm `ignix.config.js` exists before assuming Ignix is initialized (see Scenarios below). - Pass `--json` on every command whose output you plan to parse. - Run `ignix doctor --json` to check project compatibility before installing anything. - Query the registry live (`ignix list ... --json`) instead of assuming a component/theme/ template exists - the registry can change independently of the installed CLI version. - If a component's registry `description` isn't enough to know its exact props/variants, look at its real source in `packages/registry/components//index.tsx` (in this repo) or its Storybook story in `apps/storybook/src/components//` - both mirror exactly what gets installed into a user's project. DON'T - Never create `.css`/`.scss` files or `