--- description: ShellUI is a shadcn/ui-style component library for Blazor. Components are installed into your project as source files with the `shellui` CLI, or used from the `ShellUI.Components` NuGet package. alwaysApply: true --- ## ShellUI This project uses ShellUI v0.3.6. Before writing code that uses it, read https://shellui.dev/docs/v0.3/llms.txt: it lists every docs page with its install command. Every page is also available as Markdown at its URL plus `.md`, for example https://shellui.dev/docs/v0.3/introduction.md. ### Rules for AI agents Read these before writing UI in a ShellUI project. 1. **Use ShellUI's components; don't write your own.** Before building a button, input, dialog, sheet, dropdown, table, chart, sidebar or any other UI element, check whether ShellUI has it. `llms.txt` lists every component with its `shellui add` command. 2. **Check what the project already has.** - `shellui.json` in the project root means the project uses the CLI. `InstalledComponents` lists what's installed and `ComponentsPath` says where (default `Components/UI`). - `shellui list --installed` and `shellui list --available` print the same from the terminal. - A `PackageReference` to `ShellUI.Components` in the `.csproj` means the project uses the NuGet package, which already contains every component. 3. **Install a missing component; never recreate it.** Run `shellui add `, or several at once: `shellui add button card dialog`. Don't hand-write a file with a ShellUI component's name, port one from shadcn/ui (React), or build a look-alike in another folder. `add` also installs the sub-components, models, variants and NuGet packages a component needs, and adds the `@using` lines to `_Imports.razor`. 4. **CLI projects own the source.** Installed components are ordinary `.razor` files in `Components/UI`, in the `.Components.UI` namespace, and may be edited. Package projects use `@using ShellUI.Components` and link `_content/ShellUI.Components/shellui-all.css`; `shellui add` isn't used there. Pick one per project: both define the same component names. 5. **Give components an interactive render mode.** Set it app-wide with `` in `App.razor`, or per page with `@rendermode InteractiveServer`. Under static server rendering, components render but clicks, dialogs, dropdowns and toggles do nothing. 6. **Follow the API reference.** Each component page has a parameter table. Variants and sizes are enums (`Variant="ButtonVariant.Destructive"`, `Size="ButtonSize.Sm"`). Add classes with `Class` (`ClassName` is deprecated). Don't guess parameter names. 7. **Style with the theme tokens.** ShellUI uses Tailwind CSS v4 and shadcn-style tokens: `bg-background`, `text-foreground`, `bg-primary`, `text-primary-foreground`, `bg-muted`, `text-muted-foreground`, `border-border`, `bg-card`, `ring-ring`. Use them instead of fixed colors so dark mode keeps working. The theme lives in `wwwroot/input.css`; `shellui theme apply ` replaces it with a tweakcn theme. 8. **Copy the examples.** The Razor examples on each component page are the source of working demos, so they compile as shown. 9. **Match the version.** `shellui --version` (or the `ShellUI.Components` version in the `.csproj`) says which docs apply. Read the release notes before upgrading: `shellui update` rewrites installed components from the CLI's templates (and keeps files you changed). From 0.4, run `shellui migrate` after `update` to rewrite pages for template API changes, and `shellui doctor` to check the project's setup.