Installation
Add Atlas to an existing Angular application: install the package, then let its schematics set it up, or wire it by hand.
Requirements
- Angular 22 with a standalone application (
app.config.tsorbootstrapApplication) - Tailwind CSS 4 through the
@tailwindcss/postcssplugin, and a global.cssstylesheet (not SCSS) - The peer packages
@angular/cdk,@angular/aria,class-variance-authority,clsxandtailwind-merge, plustw-animate-css(recommended, for overlay animations)
The CLI setup below installs whatever of this is missing.
Install the package
Each version is released on GitHub as a tag, atlas-components-v<version>, and a GitHub Release with the package tarball. Install one exact version from its tag:
npm install "git+https://github.com/dinuvgeorge/angularatlas.git#atlas-components-v2.0.0"Set up with the CLI
The package ships Angular schematics. Run the setup once, from the workspace root:
ng generate @atlas/components:ng-addOr download the tarball from the GitHub Release and let ng add install it and run the same setup in one step:
gh release download atlas-components-v2.0.0 -R dinuvgeorge/angularatlas -p "*.tgz"
ng add ./atlas-components-2.0.0.tgzEither way the setup:
- adds the peer packages the application does not have yet, plus
tailwindcss,@tailwindcss/postcss,postcssandtw-animate-css; - creates
.postcssrc.jsonwith the Tailwind plugin, unless the workspace already configures PostCSS; - adds
provideAtlas()to the root providers; - writes the theme, Tailwind, animation and
@sourcelines into the first global stylesheet, in the order shown under Wire the styles below, with the@sourcepath computed from where the stylesheet lives.
It only adds what is missing, so running it again changes nothing. Options: --project picks the application in a multi-project workspace (the first one by default), --skip-install edits package.json without running the package manager.
Add a component
add (alias a) runs the setup if needed, installs the packages the component's entry point needs, and tells you where to import it from and which other Atlas components it brings along. Those ship in the same package, so there is nothing else to install:
ng generate @atlas/components:add data-grid
Setting up @atlas/components
Done. Check the setup any time with: ng g @atlas/components:doctor
data-grid:
import from '@atlas/components/data-display/data-grid'
uses button, checkbox, connected-overlay, … (same package, nothing to install)An unknown name lists the valid ones. Component names are kebab-case, as in the URLs of these docs.
Check the setup
doctor changes no file. It reads which @atlas/components import paths the application uses and reports, with the fix for each: missing packages (and the import path that needs them), import paths that are not entry points of the installed version, a missing provideAtlas(), and a missing theme import, Tailwind import or @source line (including one whose path does not reach the installed library).
ng generate @atlas/components:doctor
@atlas/components 2.0.0, imports: @atlas/components/core, @atlas/components/data-display/data-grid, @atlas/components/feedback/toast
✗ missing @angular/cdk (needed by @atlas/components/data-display/data-grid, @atlas/components/feedback/toast): npm i @angular/cdk@^22.0.0
✗ Tailwind does not scan the library, so its classes are not generated: @source '../node_modules/@atlas/components';
· overlays open without animation: @import 'tw-animate-css';With --strict it exits with an error when it finds a problem, so it can guard the setup in CI:
ng generate @atlas/components:doctor --strictManual setup
These are the steps the CLI performs. Do them by hand when you prefer to, or when the application is set up differently (an SCSS global stylesheet, an NgModule bootstrap).
Wire the styles
Import the theme and the overlay animations, and let Tailwind scan the library so the classes its components use are generated:
@import '@atlas/components/styles/theme.css'; /* tokens, radius, dark mode, @theme mapping */
@import 'tailwindcss';
@import 'tw-animate-css'; /* overlay enter animations */
@source '../node_modules/@atlas/components'; /* let Tailwind scan the library */Register the provider
provideAtlas() wires the configuration and the icon registry in one call:
import { ApplicationConfig, provideZonelessChangeDetection } from '@angular/core';
import { provideRouter } from '@angular/router';
import { provideAtlas } from '@atlas/components/core';
import { appIcons } from './icons';
import { routes } from './app.routes';
export const appConfig: ApplicationConfig = {
providers: [
provideZonelessChangeDetection(),
provideRouter(routes),
provideAtlas({ icons: appIcons, locale: 'en-GB' }),
],
};Use a component
Components are standalone; import them where you use them. Everything can come from @atlas/components in one import: the package is marked side-effect free, so the application bundles only the components it actually uses. Components are also grouped: @atlas/components/forms, /primitives, /layout, /navigation, /data-display, /overlay and /feedback each export their category, and every component has its own entry, @atlas/components/<category>/<name> (for example forms/select). Configuration and helpers such as provideAtlas and cn are in @atlas/components/core. When a build compiles the library from source (a monorepo path mapping), import the component entries: there the root and the category barrels would pull in everything.
import { Component } from '@angular/core';
import { AtlasButtonDirective } from '@atlas/components/primitives';
@Component({
selector: 'app-hello',
imports: [AtlasButtonDirective],
template: `<button atlasButton>Hello Atlas</button>`,
})
export class HelloComponent {}