Angular Integration
Supports: Angular 19 and later • Stencil v5
@stencil/angular-output-target generates an Angular component for each of your Stencil components. Consumers of your library get Angular components with:
- typed inputs, and outputs for your custom events
- no
CUSTOM_ELEMENTS_SCHEMAin the modules or components that use them - components detached from Angular's change detection, so Angular doesn't re-check them needlessly
- optionally, form controls that work with
ngModeland reactive forms
Setup
The generated Angular components live in their own package, published alongside your Stencil library. A monorepo with one package for each is the recommended structure:
my-design-system/
├── package.json workspace root
└── packages/
├── core/ your Stencil library
└── angular/ the generated Angular library
New Project
Run the stencil init wizard, pick Angular under framework integrations, and accept the monorepo workspace prompt. It creates the structure above with both packages configured.
Existing Project
Run the wizard from your Stencil project:
stencil add @stencil/angular-output-target
It asks where the Angular package should go and which component type to generate, then:
- creates the Angular package, set up to build with
ng-packagr - adds
angularOutputTarget()to yourstencil.config.ts, along with the output target your component type builds on - installs the dependencies for both packages