# NeoUI — Complete Documentation # Generated: 2026-04-07T11:37:24Z # Base URL: https://neoui.io ================================================================== ================================================================== FILE: getting-started.txt URL: https://neoui.io/llms/getting-started.txt ================================================================== # NeoUI -- Getting Started NeoUI is a production-ready Blazor component library inspired by shadcn/ui. It ships 100+ accessible, customizable components built for .NET 10 with InteractiveAuto render mode support. ## Fastest Start -- Project Template ```bash dotnet new install NeoUI.Blazor.Templates dotnet new neoui -n MyApp cd MyApp && dotnet run ``` Supports three interactivity modes via `-in` / `--interactivity`: -in Server -- Blazor Server (single project) -in WebAssembly -- Blazor WASM (single project) -in Auto-- InteractiveAuto (two-project solution, default) ## Manual Setup in an Existing Project ### 1. Install the Package ```bash dotnet add package NeoUI.Blazor --version 4.0.0 ``` ### 2. Add _Imports.razor Entries ```razor @using NeoUI.Blazor @using NeoUI.Blazor.Services @using NeoUI.Icons.Lucide ``` ### 3. Register Services **Server / Auto host project (Program.cs):** ```csharp builder.Services.AddNeoUIPrimitives(); builder.Services.AddNeoUIComponents(); ``` **WASM client project (Program.cs):** ```csharp builder.Services.AddNeoUIPrimitives(); builder.Services.AddNeoUIComponents(); ``` ### 4. Add Theme CSS in App.razor ```html ``` ### 5. Add Portal Hosts in MainLayout.razor Place all four after `@Body`, outside any scrollable or clipping container: ```razor ``` ### 5.5. Wrap MainLayout in AppProvider `AppProvider` must be the outermost wrapper in `MainLayout.razor`. It initializes ThemeService, restores the persisted theme from localStorage, and broadcasts StyleVariant as a CascadingValue to all child components: ```razor @* MainLayout.razor *@ @Body ``` Components rendered outside `AppProvider` will receive `StyleVariant.Default` permanently. ### 6. Enable InteractiveAuto Render Mode in App.razor ```razor ``` ## Your First Component ```razor @page "/demo" @using NeoUI.Blazor @code { int count; } ``` ## Common Import Patterns ```razor @* All styled components + services *@ @using NeoUI.Blazor @using NeoUI.Blazor.Services @* Charts (separate sub-namespace) *@ @using NeoUI.Blazor.Charts @* Headless primitives only *@ @using NeoUI.Blazor.Primitives @using NeoUI.Blazor.Primitives.Services @* Icons *@ @using NeoUI.Icons.Lucide@* 1,640 icons *@ @using NeoUI.Icons.Heroicons@* 1,288 icons *@ @using NeoUI.Icons.Feather @* 286 icons *@ ``` ## Render Mode Notes - NeoUI is designed for InteractiveAuto (Server + WASM). Set the global render mode in App.razor. - Interactive components (Tabs, NavigationMenu, etc.) require an interactive render mode. - For Server-only apps use InteractiveServer; for pure WASM use InteractiveWebAssembly. ================================================================== FILE: installation.txt URL: https://neoui.io/llms/installation.txt ================================================================== # NeoUI -- Installation Reference ## Packages | Package | Description | Version | |---------|-------------|---------| | NeoUI.Blazor | Styled components (includes Primitives + all icons transitively) | 4.0.0 | | NeoUI.Blazor.Primitives | Headless accessibility layer only | 4.0.0 | | NeoUI.Icons.Lucide | 1,640 stroke-based icons | 3.0.0 | | NeoUI.Icons.Heroicons | 1,288 icons, 4 variants (outline/solid/mini/micro) | 3.0.0 | | NeoUI.Icons.Feather | 286 minimalist icons | 3.0.0 | ## Install Commands ```bash # Styled components -- everything included dotnet add package NeoUI.Blazor --version 4.0.0 # Headless primitives only (custom design system) dotnet add package NeoUI.Blazor.Primitives --version 4.0.0 # Icons (included transitively with NeoUI.Blazor) dotnet add package NeoUI.Icons.Lucide --version 3.0.0 dotnet add package NeoUI.Icons.Heroicons --version 3.0.0 dotnet add package NeoUI.Icons.Feather --version 3.0.0 ``` ## Service Registration (Program.cs) Required in both Server host and WASM client for InteractiveAuto: ```csharp builder.Services.AddNeoUIPrimitives(); builder.Services.AddNeoUIComponents(); ``` **AppProvider:** After registering services, wrap `MainLayout.razor` in `` to initialize ThemeService and enable Theme v2 (StyleVariant, RadiusPreset, etc.). See the Getting Started guide for the full pattern. ## _Imports.razor ```razor @using NeoUI.Blazor @using NeoUI.Blazor.Services @using NeoUI.Icons.Lucide ``` For chart components: ```razor @using NeoUI.Blazor.Charts ``` For headless primitives: ```razor @using NeoUI.Blazor.Primitives @using NeoUI.Blazor.Primitives.Services ``` ## Theme CSS (App.razor) Place before `` in this order: ```html ``` This gives 10 base x 17 primary = **170** ready-made color combinations, plus style variant, radius, and font customization. ## Icon Usage ```razor @* Lucide -- kebab-case name, Size, Class, StrokeWidth *@ @* Heroicons -- Name, Variant (Outline|Solid|Mini|Micro), Size *@ @* Feather *@ ``` ## Tailwind CSS v4 (Optional -- for custom styles) NeoUI ships pre-built CSS. Tailwind is only needed when customizing styles. ```bash npm install npm run build:css # one-time build npm run watch:css # dev watch mode ``` Add to .csproj to auto-build during dotnet build: ```xml ``` ## Compatibility - .NET 10+ (also compatible with .NET 8 and .NET 9) - All Blazor hosting models: Server, WebAssembly, Auto - Dark mode: automatic via CSS variables ================================================================== FILE: architecture.txt URL: https://neoui.io/llms/architecture.txt ================================================================== # NeoUI -- Architecture NeoUI is built on a two-layer architecture separating behavior from styling, designed for .NET 10's InteractiveAuto rendering mode. ## Two-Layer Overview ### Layer 1: NeoUI.Blazor (Styled Components) - 100+ production-ready components with shadcn/ui design - Pre-built CSS included -- no Tailwind CSS setup required - Full theme support via CSS custom properties - Built on top of the Primitives layer ### Layer 2: NeoUI.Blazor.Primitives (Headless Layer) - 15 headless, unstyled components providing behavior only - WCAG 2.1 AA accessibility, keyboard navigation, ARIA attributes - Bring your own styles -- or use NeoUI.Blazor on top - Available primitives: Accordion, Checkbox, Collapsible, Dialog, Dropdown Menu, Hover Card, Label, Popover, Radio Group, Select, Sheet, Switch, Table, Tabs, Tooltip Every styled component in NeoUI.Blazor is built on a matching primitive. ## Project Structure (InteractiveAuto -- recommended) ``` MyApp.sln MyApp/ # ASP.NET Core host (Server + WASM server-side) +-- MyApp.csproj +-- Program.cs# Registers both Interactive Server + WebAssembly \-- App.razor # Global render mode = InteractiveAuto MyApp.Client/ # Blazor WebAssembly project +-- MyApp.Client.csproj +-- Program.cs# WASM entry point with NeoUI services +-- Layout/ |+-- MainLayout.razor # Sidebar + ThemeSwitcher + DarkModeToggle |\-- NavMenu.razor \-- Components/Pages/ ``` ## Render Modes ### InteractiveAuto (Recommended) Starts with Server rendering, seamlessly transitions to WebAssembly after download. ```razor ``` ### InteractiveServer All interaction handled server-side via SignalR. ```razor ``` ### InteractiveWebAssembly Pure client-side rendering. ```razor ``` ## Service Registration ### Server host Program.cs ```csharp builder.Services.AddRazorComponents() .AddInteractiveServerComponents() .AddInteractiveWebAssemblyComponents(); builder.Services.AddNeoUIPrimitives(); builder.Services.AddNeoUIComponents(); ``` ### WASM client Program.cs ```csharp builder.Services.AddNeoUIPrimitives(); builder.Services.AddNeoUIComponents(); ``` ## Portal System NeoUI uses four dedicated portal hosts to render overlays at the root DOM level, outside any stacking context that could clip or obscure them. Place all four **inside** `AppProvider` in MainLayout.razor, after `@Body` — this ensures overlays inherit the active style variant. ### Setup ```razor @inherits LayoutComponentBase @* AppProvider provides Theme v2 StyleVariant to all components, including portal overlays *@
@Body
@* Portal hosts inside AppProvider so overlays inherit the active style variant *@
``` ### What Each Host Does | Host | Renders | |------|---------| | `ToastViewport` | Toast notification messages (position configurable) | | `DialogHost` | Programmatic dialogs via `DialogService` | | `ContainerPortalHost` | Inline overlays: Popover, Tooltip, DropdownMenu | | `OverlayPortalHost` | Full-screen overlays: Dialog, Sheet, Drawer | ## Component Namespace Structure ```csharp NeoUI.Blazor// All styled components (Button, Card, Input, etc.) NeoUI.Blazor.Services// IThemeService, IDialogService, etc. NeoUI.Blazor.Charts // Chart components (separate namespace) NeoUI.Blazor.Primitives // Headless primitives NeoUI.Blazor.Primitives.Services // IKeyboardShortcutService NeoUI.Icons.Lucide// LucideIcon component NeoUI.Icons.Heroicons// HeroIcon component NeoUI.Icons.Feather // FeatherIcon component ``` ## Keyboard Shortcuts ```razor @inject IKeyboardShortcutService KeyboardShortcuts protected override async Task OnAfterRenderAsync(bool firstRender) { if (firstRender) await KeyboardShortcuts.RegisterAsync("Ctrl+K", OpenCommandPalette); } ``` ================================================================== FILE: theming.txt URL: https://neoui.io/llms/theming.txt ================================================================== # NeoUI -- Theming NeoUI is 100% compatible with shadcn/ui themes. NeoUI v4.0.0 ships Theme v2: 10 base colors x 17 primary accents = 170 combinations, plus StyleVariant, RadiusPreset, FontPreset, MenuColor, MenuAccent, and ThemePreset bundling all dimensions atomically. ## How Theming Works All NeoUI components use CSS custom properties (variables) in OKLCH color format for colors, spacing, and radius. Switching a theme means swapping variable definitions -- no recompiling, no class changes. ## AppProvider (Required in v4.0.0) `AppProvider` must wrap everything in `MainLayout.razor`, including all portal hosts. It (1) initializes ThemeService and restores the persisted theme from localStorage, and (2) broadcasts the active StyleVariant as a CascadingValue. Components outside AppProvider receive StyleVariant.Default permanently. ```razor @* MainLayout.razor *@ @Body ``` ## CSS Load Order (v4.0.0) Place in `App.razor` in this exact order: ```html ``` ## Key CSS Variables ```css :root { /* Surfaces */ --background: /* page background */; --foreground: /* body text */; --card: /* card background */; --card-foreground: /* card text */; --popover: /* popover/dropdown background */; --popover-foreground: /* popover text */; /* Brand */ --primary: /* primary brand color */; --primary-foreground: /* text on primary */; --secondary: /* secondary surface */; --secondary-foreground: /* text on secondary */; --muted: /* muted background */; --muted-foreground: /* muted text */; --accent: /* hover/accent surface */; --accent-foreground: /* text on accent */; --destructive: /* error/danger color */; --destructive-foreground: /* text on destructive */; /* Structure */ --border: /* border color */; --ring: /* focus ring color */; --radius: /* base border radius */; /* Sidebar */ --sidebar: /* sidebar background */; --sidebar-foreground: /* sidebar text */; --sidebar-primary: /* sidebar active item */; --sidebar-accent: /* sidebar hover */; --sidebar-border: /* sidebar border */; /* Charts */ --chart-1 ... --chart-5: /* chart color palette */; /* Alerts */ --alert-info, --alert-warning, --alert-success; /* Typography */ --font-sans: /* body font stack */; --font-heading: /* heading font stack; falls back to --font-sans */; /* Radius scale (proportional, safe at --radius: 0rem) */ --radius-xs: /* x0.4 */; --radius-sm: /* x0.6 */; --radius-md: /* x0.8 */; --radius-lg: /* x1.0 (base) */; --radius-xl: /* x1.4 */; --radius-2xl: /* x1.8 */; --radius-4xl: /* x2.6 */; } ``` ## Dark Mode Dark mode variables are defined in each theme file under `.dark` / `[data-theme="dark"]`. Use the built-in toggle: ```razor ``` Or `ThemeSwitcher` for full palette + style switching: ```razor ``` Register the theme service: ```csharp builder.Services.AddNeoUIComponents(); // includes ThemeService ``` ## StyleVariant Enum Controls `--radius`, `--spacing-scale`, and shadow values. Broadcast as CascadingValue from AppProvider. | Variant | --radius | --spacing-scale | Character | |---------|------------|-----------------|----------------------------------| | Default | unchanged | 1 | Backward-compatible (no file) | | Vega | 0.625rem | 1 | Professional, balanced | | Nova | 0.375rem | 0.85 | Compact, dashboard/admin | | Maia | 1rem | 1.15 | Spacious, consumer-friendly | | Lyra | 0rem | 1 | Sharp/boxy, developer tooling | | Mira | 0.25rem | 0.7 | Ultra-dense, data-heavy | | Luma | 0.75rem | 1 | Glassmorphism, modern SaaS | CSS: `_content/NeoUI.Blazor/css/themes/styles/{vega,nova,maia,lyra,mira,luma}.css` Luma extras: soft diffuse shadows, semi-transparent inputs via `color-mix`, stronger overlay blur (`--blur-sm: 4px` on `[data-slot="overlay"]`). ```csharp await ThemeService.SetStyleVariantAsync(StyleVariant.Nova); ``` ## RadiusPreset Enum Independent named radius overrides; takes precedence over StyleVariant in the CSS cascade. | Preset | Value | |--------|----------------------------| | None | 0rem | | Small | 0.45rem | | Medium | 0.625rem (default, no file)| | Large | 0.875rem | CSS: `_content/NeoUI.Blazor/css/themes/radius/{none,small,large}.css` ```csharp await ThemeService.SetRadiusPresetAsync(RadiusPreset.Large); ``` ## 7-Step Proportional Radius Scale All scale steps derive from `--radius`; safe at `--radius: 0rem` (Lyra style). | Variable | Multiplier | |-------------|------------| | --radius-xs | x0.4 | | --radius-sm | x0.6 | | --radius-md | x0.8 | | --radius-lg | x1.0 (base)| | --radius-xl | x1.4 | | --radius-2xl| x1.8 | | --radius-4xl| x2.6 | ## FontPreset Enum 6 curated font pairings setting `--font-sans` and `--font-heading`. | Preset | Description | |-------------|-------------------------------| | System | system-ui stack (default, no file) | | Inter | Inter | | Geist | Geist | | CalSans | CalSans | | DmSans | DM Sans | | PlusJakarta | Plus Jakarta Sans | CSS: `_content/NeoUI.Blazor/css/themes/fonts/{inter,geist,calsans,dmsans,plusjakarta}.css` **Note:** Font CSS files set CSS variables only. Load the actual font face files separately (e.g. Google Fonts `` tag or local @font-face declarations). ```csharp await ThemeService.SetFontPresetAsync(FontPreset.Inter); ``` ## --font-heading Variable Falls back to `--font-sans` when not explicitly set. Font presets assign it independently to enable distinct heading typography. ## MenuColor Enum Controls background treatment of all floating surfaces: Popover, DropdownMenu, Select, Combobox. | Value | Treatment | |----------------------|-------------------------------------------------------------| | Default | Solid surface | | Inverted | Dark surface (light mode only) | | DefaultTranslucent | 50% opacity + blur(18px) + saturate(150%) | | InvertedTranslucent | Dark + 70% opacity + blur (light mode only) | ```csharp await ThemeService.SetMenuColorAsync(MenuColor.DefaultTranslucent); ``` ## MenuAccent Enum Controls hover intensity on menu items. | Value | Color | |--------|------------------------------------------| | Subtle | --accent (default) | | Bold | --primary (high-contrast brand hover) | ```csharp await ThemeService.SetMenuAccentAsync(MenuAccent.Bold); ``` ## BaseColor Enum (10 Total) v4.0.0 adds 5 new chromatic neutrals. | Color | Character | |---------|-----------------------------------| | Zinc | Neutral gray (default) | | Slate | Cool blue-gray | | Gray | Neutral gray | | Neutral | Warm gray | | Stone | Warm brownish | | Luma | Blue-indigo tinted (new in v4) | | Mist | Cool blue-gray (new in v4) | | Mauve | Warm purple-gray (new in v4) | | Taupe | Warm brownish-gray (new in v4) | | Olive | Muted green-gray (new in v4) | CSS: `_content/NeoUI.Blazor/css/themes/base/{luma,mist,mauve,taupe,olive}.css` Total combinations: 10 base x 17 primary = **170** ```csharp await ThemeService.SetBaseColorAsync(BaseColor.Luma); ``` ## ThemePreset Record Bundles all 8 theme dimensions atomically: BaseColor, PrimaryColor, StyleVariant, RadiusPreset, FontPreset, MenuAccent, MenuColor, and Name. ### Built-in Presets | Preset | Base | Style | Radius | Font | |---------|-------|---------|--------|-------------| | Default | Zinc | Default | Medium | System | | Luma | Zinc | Luma | Medium | Inter | | Nova | Zinc | Nova | Small | Geist | | Maia | Mauve | Maia | Large | PlusJakarta | | Lyra | Slate | Lyra | None | Geist | ```csharp // Apply a built-in preset await ThemeService.ApplyPresetAsync(ThemePreset.Luma); // Create and apply a custom preset var custom = new ThemePreset( Name: "Glass Dashboard", BaseColor: BaseColor.Luma, PrimaryColor: PrimaryColor.Blue, StyleVariant: StyleVariant.Luma, RadiusPreset: RadiusPreset.Medium, FontPreset: FontPreset.Inter, MenuAccent: MenuAccent.Bold, MenuColor: MenuColor.DefaultTranslucent ); await ThemeService.ApplyPresetAsync(custom); ``` ## ThemeService API ```razor @inject IThemeService ThemeService ``` ### Properties | Property | Type | |-----------------------|----------------| | CurrentBaseColor | BaseColor | | CurrentPrimaryColor | PrimaryColor | | CurrentStyleVariant | StyleVariant | | CurrentRadiusPreset | RadiusPreset | | CurrentFontPreset | FontPreset | | CurrentMenuAccent | MenuAccent | | CurrentMenuColor | MenuColor | ### Methods | Method | Description | |-------------------------------------|------------------------------------------| | SetBaseColorAsync(BaseColor) | Switch base palette | | SetPrimaryColorAsync(PrimaryColor) | Switch primary accent | | SetStyleVariantAsync(StyleVariant) | Switch style variant | | SetRadiusPresetAsync(RadiusPreset) | Switch radius preset | | SetFontPresetAsync(FontPreset) | Switch font preset | | SetMenuAccentAsync(MenuAccent) | Switch menu item hover intensity | | SetMenuColorAsync(MenuColor) | Switch floating surface treatment | | ApplyPresetAsync(ThemePreset) | Apply all 8 dimensions atomically | | SetTheme(base, primary) | Legacy method -- still works | ### Runtime Switching Examples ```razor @inject IThemeService ThemeService ``` ## ThemeSwitcher Component ```razor ``` | Parameter | Type | Default | Description | |--------------------|---------------------|---------|-------------------------------------------------------| | ShowStyles | bool | false | Adds Styles tab (variant, radius, font, menu options) | | Strategy | PositioningStrategy | Fixed | Popover positioning strategy | | ZIndex | int | 60 | z-index of the switcher popover | | TriggerClass | string? | null | CSS classes on the trigger button | | PopoverContentClass| string? | null | CSS classes on the popover content | | Align | PopoverAlign | End | Popover alignment | Trigger button shows a two-tone swatch: current base color (fill) + current primary (border). With `ShowStyles="true"`: Colors tab (base + primary selectors) + Styles tab (variant, radius, font, menu accent, menu color). ## Custom Theme (OKLCH Format) NeoUI v4 uses OKLCH color format internally: ```css /* wwwroot/css/my-theme.css */ :root { --background: oklch(1 0 0); --foreground: oklch(0.145 0 0); --primary: oklch(0.623 0.214 259.8); --primary-foreground: oklch(0.985 0 0); --secondary: oklch(0.96 0 0); --muted: oklch(0.96 0 0); --accent: oklch(0.96 0 0); --destructive: oklch(0.577 0.245 27.3); --border: oklch(0.92 0 0); --ring: oklch(0.623 0.214 259.8); --radius: 0.625rem; } .dark { --background: oklch(0.145 0 0); --foreground: oklch(0.985 0 0); /* ... */ } ``` ## shadcn/ui Compatibility NeoUI is 100% compatible with shadcn/ui themes. Use any theme from https://ui.shadcn.com/themes or https://tweakcn.com directly. shadcn/ui themes use HSL format; NeoUI's own files use OKLCH. Both formats work -- CSS custom properties accept either. ## Tailwind v4 Integration NeoUI's pre-built CSS works without Tailwind. If using Tailwind v4 for custom styles, you **must** add `@theme inline` to your Tailwind build input. Without it, Tailwind v4 emits hardcoded `oklch()` values that override NeoUI's runtime CSS variable changes: ```css /* app.css */ @import "tailwindcss"; @theme inline { /* your customizations */ } ``` ================================================================== FILE: cli.txt URL: https://neoui.io/llms/cli.txt ================================================================== # NeoUI -- CLI Tools & Build Commands ## Package Management ```bash # Install styled components (includes Primitives + all icon libraries) dotnet add package NeoUI.Blazor --version 3.6.3 # Headless primitives only (custom design systems) dotnet add package NeoUI.Blazor.Primitives --version 3.6.3 # Icon libraries (included transitively with NeoUI.Blazor) dotnet add package NeoUI.Icons.Lucide --version 3.0.0 dotnet add package NeoUI.Icons.Heroicons --version 3.0.0 dotnet add package NeoUI.Icons.Feather --version 3.0.0 # Project template dotnet new install NeoUI.Blazor.Templates ``` ## Project Template CLI ```bash # Create new NeoUI Blazor app dotnet new neoui -n MyApp # With specific interactivity mode dotnet new neoui -n MyApp -in Server # Blazor Server dotnet new neoui -n MyApp -in WebAssembly# Blazor WASM dotnet new neoui -n MyApp -in Auto # InteractiveAuto (default, two-project) # Empty layout (no demo pages) dotnet new neoui -n MyApp --empty # List all template options dotnet new neoui --help ``` ## Build & Run ```bash dotnet build # Builds project (also runs npm install + Tailwind CSS if configured) dotnet run# Starts dev server at https://localhost:5001 dotnet watch # Hot-reload dev mode dotnet publish # Publish for deployment ``` ## CSS Build (Tailwind CSS v4 -- optional) ```bash npm install # Install Tailwind and dependencies npm run build:css # One-time CSS compilation npm run watch:css # Watch mode for development ``` The NeoUI project template pre-configures the .csproj to auto-run the CSS build on `dotnet build`: ```xml ``` ## Testing ```bash dotnet test # Run all tests dotnet test --filter "Category=Unit" ``` ## NuGet Pack & Publish (library authors) ```bash dotnet pack -c Release dotnet nuget push bin/Release/*.nupkg --api-key $NUGET_API_KEY --source https://api.nuget.org/v3/index.json ``` ## Useful dotnet CLI Tips ```bash dotnet list package --outdated # Check for newer package versions dotnet restore # Restore NuGet packages dotnet clean # Clean build outputs dotnet format# Format code (requires dotnet-format tool) ``` ================================================================== FILE: templates.txt URL: https://neoui.io/llms/templates.txt ================================================================== # NeoUI -- Project Templates NeoUI ships a `dotnet new` template that scaffolds a complete, production-ready Blazor app with sidebar layout, theme switcher, dark mode, Spotlight command palette, and Tailwind CSS v4. ## Install the Template ```bash dotnet new install NeoUI.Blazor.Templates ``` ## Create a New App ```bash dotnet new neoui -n MyApp # Auto mode (default) dotnet new neoui -n MyApp -in Server# Blazor Server dotnet new neoui -n MyApp -in WebAssembly # Blazor WebAssembly dotnet new neoui -n MyApp -in Auto # InteractiveAuto dotnet new neoui -n MyApp --empty# Minimal layout, no demo pages dotnet new neoui -n MyApp -in Auto --empty# Auto + minimal ``` ## Template Options | Option | Short | Values | Default | Description | |--------|-------|--------|---------|-------------| | `--interactivity` | `-in` | Server, WebAssembly, Auto | Auto | Blazor render mode | | `--empty` | | flag | false | Skip demo pages, minimal layout | | `--style` | | Default/Vega/Nova/Maia/Lyra/Mira/Luma | Default | Theme v2 style variant -- spacing/radius/density | | `--font` | | System/Inter/Geist/CalSans/DmSans/PlusJakarta | System | Font preset (sets --font-sans/--font-heading CSS vars) | | `--radius` | | None/Small/Medium/Large | Medium | Border radius preset | | `--menuColor` | | Default/Inverted/DefaultTranslucent/InvertedTranslucent | Default | Menu/popover surface style | | `--menuAccent` | | Subtle/Bold | Subtle | Menu item hover intensity | ## Project Structures ### Server Mode (`-in Server`) -- Single Project ``` MyApp/ +-- MyApp.csproj +-- Program.cs +-- App.razor +-- Layout/ |+-- MainLayout.razor # NeoUI Sidebar + ThemeSwitcher + DarkModeToggle |\-- NavMenu.razor +-- Components/ |+-- Common/ ||+-- AppLoader.razor ||\-- SpotlightCommandPalette.razor |\-- Pages/ +-- Home.razor +-- Counter.razor +-- Weather.razor \-- NotFound.razor +-- styles/ # Tailwind CSS source +-- wwwroot/ # Compiled CSS + static assets +-- package.json \-- tailwind.config.js ``` ### Auto / WebAssembly Mode -- Two-Project Solution ``` MyApp.sln MyApp/ # Web host project \-- MyApp.csproj MyApp.Client/# WebAssembly client +-- MyApp.Client.csproj +-- Program.cs +-- Layout/ |+-- MainLayout.razor |\-- NavMenu.razor +-- Components/ |+-- Common/ ||+-- AppLoader.razor ||+-- ReconnectModal.razor # Auto mode only ||\-- SpotlightCommandPalette.razor |\-- Pages/ +-- Home.razor +-- Counter.razor +-- Weather.razor \-- NotFound.razor +-- styles/ +-- wwwroot/ +-- package.json \-- tailwind.config.js ``` ## What the Template Includes - **Sidebar layout** -- collapsible navigation, breadcrumbs, responsive mobile support - **ThemeSwitcher** -- 170-combination theme picker (10 base x 17 primary) with style variant selector - **DarkModeToggle** -- OS-aware dark mode - **Spotlight Command Palette** -- Ctrl+K fuzzy search for components and pages - **Tailwind CSS v4** -- pre-configured with NeoUI design tokens - **Pre-wired services** -- `AddNeoUIPrimitives()`, `AddNeoUIComponents()` - **_Imports.razor** -- all NeoUI namespaces ready to use - **Sample pages** -- Home, Counter, Weather (can be removed with `--empty`) ## Post-Create Steps The Tailwind CSS build and `npm install` run automatically on `dotnet build`. Node.js must be on your PATH. ```bash cd MyApp dotnet run --project MyApp# Start the app ``` ## Updating the Template ```bash dotnet new update # Update all installed templates dotnet new install NeoUI.Blazor.Templates::4.0.0# Pin a version ``` ================================================================== FILE: components.txt URL: https://neoui.io/llms/components.txt ================================================================== # NeoUI -- Components Reference NeoUI ships 100+ production-ready styled components. All require `@using NeoUI.Blazor`. ## Quick Import ```razor @using NeoUI.Blazor @using NeoUI.Blazor.Services @using NeoUI.Icons.Lucide ``` --- ## Inputs & Forms ### Button ```razor ``` Variants: `Default` | `Secondary` | `Destructive` | `Outline` | `Ghost` | `Link` Sizes: `Default` | `Sm` | `Lg` | `Icon` ### Input ```razor ``` Types: text | password | email | number | search | url | tel ### Textarea ```razor