Add a component to a ui library


nx generate component ...
nx g c ... # same

By default, Nx will search for component in the default collection provisioned in nx.json.

You can specify the collection explicitly as follows:

nx g @nxext/stencil:component ...

Show what will be generated without writing to disk:

nx g component ... --dry-run


name (required)

Type: string

project (required)

Alias(es): p

Type: string

Project where the component is generated


Alias(es): d

Type: string

A directory where the project is placed


Default: false

Type: boolean