{
  "markdown": "# ng-blatui\n\n[![npm](https://img.shields.io/npm/v/ng-blatui.svg)](https://www.npmjs.com/package/ng-blatui)\n[![license](https://img.shields.io/npm/l/ng-blatui.svg)](./LICENSE)\n[![Angular](https://img.shields.io/badge/Angular-21%20%26%2022-dd0031.svg)](https://angular.dev)\n\nAccessible **Angular UI library** — a faithful port of [BlatUI](https://ngblatui.remix-it.com)'s visual system to Angular. Built on the official Angular headless stack (Angular Aria + CDK), styled with Tailwind CSS v4 + oklch design tokens.\n\n**157 components · 16 blocks · 70 charts · 35 page templates** — all standalone, signal-based, zoneless and SSR-safe.\n\n🔗 **[Docs & live demo →](https://ngblatui.remix-it.com)** · 📦 **[npm](https://www.npmjs.com/package/ng-blatui)** · 🤖 **[Using with AI →](./USING-WITH-AI.md)**\n\n---\n\n## Highlights\n\n- **Angular 21 & 22** — standalone components, **signals** (`input()`/`model()`/`output()`), **zoneless** change detection, `OnPush` by default.\n- **SSR-ready** — every component renders correctly under server-side rendering (the docs site prerenders 280+ static routes).\n- **Accessible** — behavior built on `@angular/aria` + `@angular/cdk`; passes AXE / WCAG AA.\n- **Forms-native** — every form control implements `ControlValueAccessor`, so the same component works with Reactive, Template-driven and Signal forms.\n- **Themeable** — Tailwind v4 utilities + CSS variables (oklch tokens); light/dark out of the box.\n- **AI-ready** — ships an MCP server, an `llms.txt` index and a machine-readable registry (see below).\n\n## Installation\n\n```bash\nnpm i ng-blatui\n```\n\nPeer dependencies (Angular **21 or 22**): `@angular/core`, `@angular/common`, `@angular/forms`, `@angular/cdk`, `@angular/aria`.\n\n### Tailwind CSS setup\n\nStyling is **Tailwind CSS v4**. In your app's global stylesheet (e.g. `src/styles.css`) add three lines:\n\n```css\n@import 'tailwindcss';\n@import 'ng-blatui/foundations/blatui.css'; /* design tokens + dark theme */\n@source '../node_modules/ng-blatui'; /* ← generate the utilities the lib's classes use */\n```\n\nThe **`@source`** line is the easy one to miss: without it Tailwind never scans ng-blatui's\ncompiled templates, so the components render **unstyled**. Point it at wherever `ng-blatui` lives\nrelative to the stylesheet (adjust the `../` depth). Dark mode is a `dark` class on a parent\n(`<html class=\"dark\">`); override any oklch token in `:root` / `.dark` to re-theme. Full guide:\n**https://ngblatui.remix-it.com/docs/installation**.\n\n### Icons\n\nng-blatui ships no icon set — wire your own (e.g. [`@ng-icons`](https://ng-icons.github.io/ng-icons/))\nwith `provideIcons(...)` and register each icon you use. Components that take an icon accept an SVG\npath `d` string, so any icon source works.\n\n## Usage\n\nImport the component class from the `ng-blatui` barrel and add it to a standalone component's `imports[]` — no NgModule. Selectors are prefixed **`bui`**.\n\n```ts\nimport { Component } from '@angular/core';\nimport { BuiButton, BuiBadge, BuiInput } from 'ng-blatui';\n\n@Component({\n  selector: 'app-demo',\n  imports: [BuiButton, BuiBadge, BuiInput],\n  template: `\n    <label>\n      Email\n      <input buiInput type=\"email\" placeholder=\"you@example.com\" />\n    </label>\n    <button buiButton>Save <span buiBadge tone=\"success\">New</span></button>\n  `,\n})\nexport class Demo {}\n```\n\n- **Element selectors**: `<bui-avatar>`, `<bui-rating>`, …\n- **Attribute/directive selectors**: `<button buiButton>`, `<input buiInput>`, `<span buiBadge tone=\"success\">`, …\n- **Signals**: bind `[checked]` / `(checkedChange)` etc.; works under zoneless CD and SSR with no extra setup.\n- **Forms**: `formControlName`, `[(ngModel)]` or `[formControl]` all work — every control is a `ControlValueAccessor`.\n\n### Form fields: two levels\n\n- **Batteries-included** components wire label + hint + error + ARIA for you: `BuiInputField`,\n  `BuiMoneyInput` (localized currency; `symbol=\"DH\"` overrides the ISO code), `BuiDateRangePicker`\n  (start→end with presets), plus `BuiSelect`, `BuiCombobox`, `BuiAutocomplete`, `BuiPhoneInput`.\n- **Composition primitives** for custom layouts: `buiField` + `buiFieldLabel` / `buiFieldDescription`\n  / `buiFieldError` wrap a bare `buiInput` / `.blat-*` control and manage the a11y relationships.\n\nReach for a bare control (`buiInput`) only when you also add the `buiField` scaffolding yourself.\nOther easy-to-miss building blocks: `buiEmpty` (empty states), `bui-stat` (stat cards),\n`buiFieldSet` / `buiFieldLegend` (grouped fields).\n\n## Theming\n\nStyling is Tailwind v4 + CSS variables. Override the oklch design tokens (`--background`, `--foreground`, `--primary`, `--border`, `--muted`, `--radius`, …) to restyle everything globally; toggle a `dark` class for dark mode. See **https://ngblatui.remix-it.com/docs/theming**.\n\n## Localization\n\nTwo providers cover the whole library, both set once in your app config:\n\n```ts\nimport { provideBuiLabels, provideBuiLocale } from 'ng-blatui';\n\nproviders: [\n  provideBuiLocale('fr-BE'), // dates, times, numbers, week start, weekend, week numbering\n  provideBuiLabels({ fileUploadRemove: 'Supprimer le fichier' }), // built-in strings\n];\n```\n\n**Set neither and everything formats as `en-US`** — that is Angular's own `LOCALE_ID` default, and\nthe usual reason pickers stay American in an app that is not. Resolution runs most-specific first:\na component's `[locale]` input → `provideBuiLocale()` → the app's `LOCALE_ID` → `en-US`. You never\nneed `registerLocaleData()` here; ng-blatui formats through `Intl`.\n\nBoth providers also take a **signal**, or a factory run in an injection context — which is what\nkeeps them open to any translation library (Transloco, ngx-translate, a signal store of your own)\nwithout ng-blatui depending on one, or knowing any translation format. Full guide, with a Transloco\nexample: **https://ngblatui.remix-it.com/docs/localization**.\n\n## What's inside\n\n| Category       | Count | Browse                                   |\n| -------------- | ----- | ---------------------------------------- |\n| **Components** | 157   | https://ngblatui.remix-it.com/components |\n| **Blocks**     | 16    | https://ngblatui.remix-it.com/blocks     |\n| **Charts**     | 70    | https://ngblatui.remix-it.com/charts     |\n| **Templates**  | 35    | https://ngblatui.remix-it.com/templates  |\n\nTemplates are full, production-style pages (dashboard, pricing, auth, store, CRM, blog, docs, e-commerce product, plus 20 art-directed landing pages) — faithful 1:1 reproductions of the BlatUI originals.\n\n## Using with AI agents\n\nng-blatui is built to be consumed by AI coding assistants so they discover and use the catalog correctly instead of guessing — via three layers:\n\n| Layer             | What                                                        | Where                                       |\n| ----------------- | ----------------------------------------------------------- | ------------------------------------------- |\n| **MCP server**    | Tools to list/search the catalog and fetch full docs + code | `npx ng-blatui-mcp`                         |\n| **llms.txt**      | The [llms.txt](https://llmstxt.org) standard index          | https://ngblatui.remix-it.com/llms.txt      |\n| **registry.json** | Machine-readable catalog                                    | https://ngblatui.remix-it.com/registry.json |\n\nQuick start (works in Claude, Cursor, Windsurf, Cline, Zed, VS Code…):\n\n```bash\nclaude mcp add ng-blatui -- npx -y ng-blatui-mcp\n# or add to any MCP client:\n# { \"mcpServers\": { \"ng-blatui\": { \"command\": \"npx\", \"args\": [\"-y\", \"ng-blatui-mcp\"] } } }\n```\n\nThe MCP server exposes `list_components` (optional `category`), `list_blocks`, `list_charts`, `list_templates`, `search({ query })` and `get_docs({ name })`. Full guide with per-client config and copy-paste editor rules: **[USING-WITH-AI.md](./USING-WITH-AI.md)**.\n\n---\n\n## Development\n\nThis is an Angular workspace with two projects: the library (`projects/ng-blatui`) and the docs/demo app (`projects/demo`).\n\n```bash\ngit clone https://github.com/anousss007/ng-blatui.git\ncd ng-blatui\nnpm install\nnpm start          # serve the docs/demo app at http://localhost:4200\n```\n\n### Scripts\n\n| Command                    | What it does                                             |\n| -------------------------- | -------------------------------------------------------- |\n| `npm start`                | Serve the demo app (`ng serve demo`)                     |\n| `npm run build:lib`        | Build the publishable library (`ng build ng-blatui`)     |\n| `npm run build`            | Build the demo site                                      |\n| `npm test`                 | Unit tests (Vitest)                                      |\n| `npm run lint`             | ESLint (type-aware, strict) + template a11y              |\n| `npm run format`           | Prettier (with Tailwind class sorting)                   |\n| `npm run build:registry`   | Regenerate `registry.json` + `llms.txt` from the catalog |\n| `npm run capture:previews` | Capture template preview images (Playwright)             |\n| `npm run deploy:site`      | Build + deploy the docs site to the VPS                  |\n\n### Project structure\n\n```\nprojects/\n  ng-blatui/        # the published library (src/lib/* = 157 component dirs, public-api.ts)\n  demo/             # docs + live demo site (components/blocks/charts/templates galleries)\n    src/app/pages/templates/   # the 35 page templates\n    public/         # static assets incl. generated llms.txt + registry.json\nscripts/\n  build-registry.mjs   # generates registry.json + llms.txt + mcp/registry.json\n  capture-previews.mjs # template preview screenshots\n  deploy-site.sh       # build + rsync to VPS\nmcp/                # the ng-blatui-mcp MCP server package (published separately)\n.claude/skills/     # angular-best-practices (contributing) + ng-blatui (consuming)\nAGENTS.md           # guide for AI agents working IN this repo\nUSING-WITH-AI.md    # guide for consuming ng-blatui WITH an AI agent\n```\n\n### Conventions\n\nAngular **v22**, zoneless, standalone (defaults — never set explicitly). Signals everywhere; native control flow (`@if`/`@for`/`@switch`); no `*ngIf`/`ngClass`. Library selector prefix `bui`, demo prefix `app`. See **[AGENTS.md](./AGENTS.md)** and **[CONTRIBUTING.md](./CONTRIBUTING.md)** for the full ruleset.\n\n## Releasing\n\n- **Library** (`ng-blatui`) — the **Release** GitHub Actions workflow (manual dispatch) runs `semantic-release`: it analyzes Conventional Commits, bumps the version, tags, creates a GitHub release and publishes to npm with provenance.\n- **MCP server** (`ng-blatui-mcp`) — bump `mcp/package.json`, then run the **Release MCP** workflow (manual dispatch) to publish it.\n\n## Credits\n\nAngular port of [**BlatUI**](https://ngblatui.remix-it.com) (Blade/Laravel + Tailwind component system). Behavior on Angular Aria + CDK.\n\n## License\n\n[MIT](./LICENSE)\n",
  "bytes": 10892,
  "sha": "7075c4d1c9bfeaa6ef6ad523e741d51438de790575f348c555db53a4a1aeca96",
  "repo_slug": "anousss007/ng-blatui",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/mcp_io_github_anousss007_ng_blatui_1c08c6d9/readme"
}