ng-zorro-antd support schematics, you can init configuration and generate component with schematics now.

Init Project#

Init project with ng-zorro-antd.


ng add ng-zorro-antd [options]



ng-zorro-antd will create theme.less in src folder.

You can get more information at the Customize Theme part.


If you add --locale=[language]ng-zorro-antd import the language package and the i18n part of angular in the app.module.ts.

The default i18n config of ng-zorro-antd is zh_CN now,you can get more information at the Internationalization part.


Enable the BrowserAnimationsModule your app module


Install and import hammerjs for gesture support in your project

Component Generation#

You can get component generation code in our doc after expand the code panel below every example.


ng g ng-zorro-antd:[schematic] <name> [options]

For example, you can generate an login form with the follow command.

ng g ng-zorro-antd:form-normal-login login



Specifies if the component is an entry component of declaring module.


Specifies if declaring module exports the component.


Flag to indicate if a dir is created.

--inline-style (-s)

Specifies if the style will be in the ts file.

--inline-template (-t)

Specifies if the template will be in the ts file.

--module (-m)

Allows specification of the declaring module.

--prefix (-p)

The prefix to apply to generated selectors.


The name of the project.


The selector to use for the component.


Flag to skip the module import.


Specifies if a spec file is generated.


The file extension to be used for style files.