Getting Started

Get Started

Installation

Angular Primitives is distributed as a single package with entrypoints for each primitive. This makes it easy to install and update, while keeping the bundle size as small as possible.

To install Angular Primitives using the Angular CLI, run the following command:
ng add ng-primitives

This command will install Angular Primitives and add the necessary dependencies to your project.

Usage

Once Angular Primitives is installed, you can start using the primitives in your Angular application. It is best to create a reusable component that encapsulates the primitives, so that you can easily reuse it throughout your application.

Primitives can be used both within a template or as a host directive on a component giving you the flexibility to choose the best approach for your use case.

Primitives add data- attributes to the elements they are applied to based on their current state. This allows you to easily style the primitives using CSS without having to rely on JavaScript.

Copyright © 2025 Angular Primitives