ng-zorro-developer
Skill33 starsChanged 3 months agoMITView on GitHub
Generates NG-ZORRO code and guidance for Angular projects using `ng-zorro-antd`. Covers installation, LESS-variable theming (default, dark, compact, aliyun presets), the experimental dynamic CSS-variable theme, component usage across all categories (general, layout, navigation, data entry, data display, feedback), ReactiveForms / Signal Forms integration via `nz-form`, internationalisation (`provideNzI18n`), accessibility, and the module → standalone migration. Use when the user mentions NG-ZORRO, ng-zorro, ng-zorro-antd, Ant Design for Angular, `nz-*` components, `Nz*Module`, OR when the Angular project's `package.json` contains `ng-zorro-antd`. Pairs with `angular-developer` for Angular fundamentals.
In this repository4 other files it gives its agents.
- angular-material-developerSkill
- primeng-developerSkill
- spartan-ng-developerSkill
- ui-craftSkill
The file
We split this skill into the rules it gives an agent
2 rules. About 0 are common, 0 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 26
If the project's ng-zorro-antd major doesn't match @angular/core, the install will fail npm peer checks.
- Very specific: line 33
Detect the theming mode: If src/styles.less imports ng-zorro-antd/ng-zorro-antd.less → LESS variable mode (the default).
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
NG-ZORRO Developer Guidelines
Pairs with
angular-developer, that skill provides Angular fundamentals (signals, DI, routing, forms, SSR, accessibility). This skill focuses on NG-ZORRO specifics. Install both for the best experience.
Compatibility
- Tracks:
ng-zorro-antd@22.1.2, aligned with Angular^22.0.0. NG-ZORRO follows Angular's major version, the major number ofng-zorro-antdalways matches@angular/core. - v21 → v22 (real breaking changes): v22 removes long-deprecated inputs and changes date-component setup. The headline items: date-related components no longer ship a default date adapter (call
provideNzDateFnsAdapter()explicitly, anddate-fnsis now v4); all components moved toOnPush; and a batch of deprecated APIs were removed (nz-buttonnzSearch,nz-cascadernzDisplayWith,nz-inputnzAutosize+nz-input-groupslots +nzStepperless,nz-modalnzOnOk/nzOnCancelinput usage,nz-uploadnzTransformFile,nz-tooltipcdkConnectedOverlayPush, plus dropdown/collapse/message/transfer removals). See migration.md. - v22.1 highlights: standalone
style/rtl.lessfiles are removed (LTR and RTL now share CSS logical properties), a few LESS variables were renamed (@anchor-link-*,@tabs-horizontal-*), Signal Forms fixes landed for input, date range picker and slider,nz-avataraccepts responsive sizes,nz-cron-expressionsupportsnzStatus, andnz-auto-completegainednzDropdownMatchSelectWidth. 22.1.2 isolates internalngModelcontrols to avoidNG01354errors. See migration.md. - Works for: NG-ZORRO v17 → v22 projects. The skill assumes the v21/v22 API surface, the
migration.mdreference covers the module → standalone shift, the i18n provider change, the v22 removals, and the per-version deprecations. - Angular: v17 or newer (standalone components and the new control flow); v22 for
ng-zorro-antd@22. v22 is the closest match. - Zoneless / OnPush: NG-ZORRO officially supports zoneless change detection and
ChangeDetectionStrategy.OnPush, the components are signal-aware and usemarkForCheck()internally where needed. - SSR: First-class. Works under Angular Universal /
@angular/ssr. - Internationalisation:
provideNzI18n(en_US)at the root, swap locales at runtime viaNzI18nService. - Not supported: NG-ZORRO v16 and below (Angular v16 and below, NgModule-only patterns, no signals support).
If the project's ng-zorro-antd major doesn't match @angular/core, the install will fail npm peer checks. Tell the user to upgrade Angular first, then NG-ZORRO, in lockstep, see migration.md.
- Check the project's NG-ZORRO version before answering. Major versions track Angular and pick up real changes, the i18n provider became
provideNzI18nin v17, full standalone-class exports landed in v18, dynamic theme is still experimental in v21.package.jsonis the source of truth. - Detect the import style up front. Pre-v18 code imports
Nz*Moduleand registers them in@NgModule.imports. v18+ exports each component as a standalone class (e.g.NzButtonComponent) plus a slim directive set (e.g.NzButtonDirectivefor thenz-buttonattribute). New code should use standalone imports, neverNz*Modulein a v18+ project. Both styles still work, mixing them in a single template is fine. See setup.md. - Detect the theming mode. If
src/styles.lessimportsng-zorro-antd/ng-zorro-antd.less→ LESS variable mode (the default). If the project usesng-zorro-antd/style/dynamic-theme/dynamic-theme.lessandNzConfigServiceto flip CSS variables at runtime → Dynamic theme (experimental). The two paths share variable names but customise at very different layers. See theming.md. - After generating NG-ZORRO code, run
ng build. The most common AI mistakes are: (a) importingNz*Moduleinto a standalone component (works, but stale pattern, prefer the standalone class); (b) forgetting to register the locale (provideNzI18n(en_US)), which makes DatePicker / Pagination throw at runtime; (c) using v15-eranzI18nServiceinitialisation viaAPP_INITIALIZER, replaced by the provider in v17; (d) using<nz-icon>withoutprovideNzIconsPatch/ registering icons viaprovideNzIcons. See setup.md and migration.md.
NG-ZORRO architecture: directives, components, services
NG-ZORRO mixes three patterns. Knowing which one a component uses changes how you wire it up:
- Attribute directives on native elements, e.g.
<button nz-button nzType="primary">Save</button>. The directive enhances a native control. Most general components (Button, Tooltip, Popover, Dropdown trigger) follow this shape. - Standalone components, e.g.
<nz-table>,<nz-form-item>,<nz-date-picker>. Render their own DOM, used for anything with internal layout or template projection. - Injectable services for imperative UI,
NzModalService,NzMessageService,NzNotificationService,NzDrawerService. Imported viaprovideNzModal()/provideNzMessage()etc. inapp.config.ts.
Default to the directive form when both exist (e.g. nz-button over a wrapper component). Reach for the service form when the surface is genuinely imperative (toasts, transient confirmations, programmatic dialogs).
Installation and theming
- Setup:
ng add ng-zorro-antd(schematics handles i18n, styles, animations, icon registration). Manual install,provideNzI18n,provideNzIcons, animations setup, common pitfalls. Read setup.md - Theming: LESS variable overrides (
@primary-color,@border-radius-base, etc.), the four shipped presets (default, dark, compact, aliyun), the experimental dynamic theme with CSS variables, runtime theme switching. Read theming.md
Components
NG-ZORRO documents 70+ components grouped by category on ng.ant.design/components/overview. Each category file below covers the components, their key inputs, common patterns, and gotchas.
- General: Button, FloatButton, Icon, Typography. Read general.md
- Layout: Divider, Flex, Grid, Layout (Header / Sider / Content / Footer), Space, Splitter. Read layout.md
- Navigation: Anchor, Breadcrumb, Dropdown, Menu, PageHeader, Pagination, Steps, Tabs. Read navigation.md
- Data Entry (form controls): AutoComplete, Cascader, Checkbox, ColorPicker, DatePicker, Form, Input, InputNumber, Mention, Radio, Rate, Select, Slider, Switch, TimePicker, Transfer, TreeSelect, Upload. Read form-controls.md
- Data Display: Avatar, Badge, Calendar, Card, Carousel, Collapse, Comment, Descriptions, Empty, Image, List, QRCode, Segmented, Statistic, Table, Tag, Timeline, Tree, TreeView. Read data-display.md
- Feedback (overlays): Alert, Drawer, Message, Modal, Notification, Popconfirm, Popover, Progress, Result, Skeleton, Spin, Tooltip. Read overlays.md
- Other: Affix, Watermark. Covered inside layout.md.
Forms integration
- Forms: Wiring
nz-formto ReactiveForms (the default in v17+) and Signal Forms (Angular v22+), thenz-form-item/nz-form-control/nz-form-labeltriad, async validators andnzValidatingTip, ControlValueAccessor patterns for custom controls. Read forms.md
Accessibility
- Accessibility: WAI-ARIA conventions NG-ZORRO honours, keyboard nav (especially Menu / Tree / Table), focus management in Modal and Drawer, RTL support via
nzDirection. Read accessibility.md
Migration
- Migration: Module → standalone shift (v18), the
provideNzI18nprovider (v17),<nz-icon>registration viaprovideNzIcons(v17+), v18 → v21 component-level renames and prop deprecations, the upcoming dynamic theme road. Read migration.md
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

