# CoreUI Angular documentation > CoreUI for Angular is a UI component library written in TypeScript and ready for your next Angular project. --- # Angular Components Library > CoreUI for Angular is a UI Component library written in TypeScript, and ready for your next Angular project. Learn how to include CoreUI Angular Components in your project. ## Installation #### Prerequisites Before you begin, make sure your development environment includes `Node.js®` and an `npm` package manager. ###### Node.js Angular 22 requires `Node.js` LTS version `^22.22.3`, `^24.15.0` or `^26.0.0`. - To check your version, run `node -v` in a terminal/console window. - To get `Node.js`, go to [nodejs.org](https://nodejs.org/). ###### Angular CLI The Angular CLI is a command-line interface tool that allows you to scaffold, develop, test, deploy, and maintain Angular applications directly from a command shell. Install the Angular CLI globally using a terminal/console window. ```bash npm install -g @angular/cli ``` See also: Angular setup #### Angular CLI **CoreUI v5.7 for Angular 22** supports `ng add` to install all required dependencies for your Angular project. ```bash ng add @coreui/angular ``` #### Npm Your other option is to use `npm install` directly. ```bash npm install @coreui/angular @coreui/coreui @coreui/icons-angular ``` ## Using components ```ts import { AlertModule } from '@coreui/angular'; @NgModule({ imports: [AlertModule,] }) export class AppModule(){} ``` ## Standalone components Starting from version `4.4.x` CoreUI Angular components are marked as `standalone: true`. ## Animations Since version `5.7.25` no CoreUI Angular component uses the `@angular/animations` module — every animation runs on CSS transitions. You no longer need `BrowserAnimationsModule` or `provideAnimationsAsync()` for our components, and `@angular/animations` can be dropped from your dependencies unless your own code uses it.
Danger: This action is not reversible
``` For visually hidden interactive controls, such as traditional "skip" links, use the `.visually-hidden-focusable` class. This will ensure that the control becomes visible once focused (for sighted keyboard users). **Watch out, compared to the equivalent `.sr-only` and `.sr-only-focusable` classes in past versions, CoreUI's `.visually-hidden-focusable` is a standalone class, and must not be used in combination with the `.visually-hidden` class.** ```html Skip to main content ``` ### Reduced motion CoreUI for Angular includes support for the [`prefers-reduced-motion` media feature](https://drafts.csswg.org/mediaqueries-5/#prefers-reduced-motion). In browsers/environments that allow the user to specify their preference for reduced motion, most CSS transition effects in CoreUI for Angular (for instance, when a modal dialog is opened or closed, or the sliding animation in carousels) will be disabled, and meaningful animations (such as spinners) will be slowed down. On browsers that support `prefers-reduced-motion`, and where the user has *not* explicitly signaled that they'd prefer reduced motion (i.e. where `prefers-reduced-motion: no-preference`), CoreUI for Angular enables smooth scrolling using the `scroll-behavior` property. ## Additional resources - [Web Content Accessibility Guidelines (WCAG) 2.1](https://www.w3.org/TR/WCAG21/) - [The A11Y Project](https://www.a11yproject.com/) - [MDN accessibility documentation](https://developer.mozilla.org/en-US/docs/Web/Accessibility) - [Tenon.io Accessibility Checker](https://tenon.io/) - [Color Contrast Analyser (CCA)](https://developer.paciellogroup.com/resources/contrastanalyser/) - ["HTML Codesniffer" bookmarklet for identifying accessibility issues](https://github.com/squizlabs/HTML_CodeSniffer) - [Microsoft Accessibility Insights](https://accessibilityinsights.io/) - [Deque Axe testing tools](https://www.deque.com/axe/) --- # DocumentationCoreUI is an MIT-licensed open-source project and is utterly free to use. However, the effort needed to maintain and develop new features for the project is not sustainable without proper financial backing.
You can support our Open Source software development in the following ways:
Try out our new products:
| xs <576px | sm ≥576px | md ≥768px | lg ≥992px | xl ≥1200px | xxl ≥1400px | |
|---|---|---|---|---|---|---|
Container max-width | None | 540px | 720px | 960px | 1140px | 1320px |
| Class prefix | <c-col xs=> | <c-col sm=> | <c-col md=> | <c-col lg=> | <c-col xl=> | <c-col xxl=> |
| # of columns | 12 | |||||
| Gutter width | 1.5rem (.75rem on left and right) | |||||
| Custom gutters | Yes | |||||
| Nestable | Yes | |||||
| Column ordering | Yes | |||||
const ariaLabel = (index, total) => `Enter digit ${index + 1} of your ${total}-digit verification code`
### Keyboard support
The one-time password input component provides comprehensive keyboard navigation support:
| Key | Action |
| --- | --- |
|ArrowLeft | Moves focus to previous field |
|ArrowRight | Moves focus to next field |
|Backspace | Delete current character or move to a previous field (if empty) |
|Tab | Move to next focusable element (respects linear mode) |
|Shift + Tab | Move to previous focusable element |
|Ctrl + V / Cmd + V | Paste clipboard content and auto-fill fields |
## Customizing
### CSS Classes
The One Time Password Input components use the following CSS classes:
- `.form-otp` - Applied to the wrapper container
- `.form-otp-sm` - Small size variant
- `.form-otp-lg` - Large size variant
- `.form-otp-control` - Applied to individual input elements
### SASS variables
```scss
$form-otp-gap: .125rem !default;
$form-otp-control-width: 2rem !default;
$form-otp-control-padding-y: $input-padding-y !default;
$form-otp-control-padding-x: 0 !default;
$form-otp-control-font-family: $input-font-family !default;
$form-otp-control-font-size: $input-font-size !default;
$form-otp-control-font-weight: $input-font-weight !default;
$form-otp-control-line-height: $input-line-height !default;
$form-otp-control-color: $input-color !default;
$form-otp-control-bg: $input-bg !default;
$form-otp-control-border-width: $input-border-width !default;
$form-otp-control-border-color: $input-border-color !default;
$form-otp-control-border-radius: $input-border-radius !default;
$form-otp-control-box-shadow: $input-box-shadow !default;
$form-otp-control-transition: $input-transition !default;
$form-otp-control-focus-color: $input-focus-color !default;
$form-otp-control-focus-bg: $input-focus-bg !default;
$form-otp-control-focus-border-color: $input-focus-border-color !default;
$form-otp-control-focus-box-shadow: $input-focus-box-shadow !default;
$form-otp-control-width-sm: 1.5rem !default;
$form-otp-control-padding-y-sm: $input-padding-y-sm !default;
$form-otp-control-padding-x-sm: 0 !default;
$form-otp-control-font-size-sm: $input-font-size-sm !default;
$form-otp-control-border-radius-sm: $input-border-radius-sm !default;
$form-otp-control-width-lg: 2.5rem !default;
$form-otp-control-padding-y-lg: $input-padding-y-lg !default;
$form-otp-control-padding-x-lg: 0 !default;
$form-otp-control-font-size-lg: $input-font-size-lg !default;
$form-otp-control-border-radius-lg: $input-border-radius-lg !default;
```
## API reference
### OTP Module
```ts
import { NgModule } from '@angular/core';
import { OneTimePasswordModule } from '@coreui/angular';
@NgModule({
imports: [OneTimePasswordModule]
})
export class CustomAppModule {}
```
### OTP Standalone
```ts
import { Component } from '@angular/core';
import { OneTimePasswordComponent, OtpDirective } from '@coreui/angular';
@Component({
template: `
| Key | Function | Note |
|---|---|---|
| ArrowLeft | Moves focus to previous step | layout="horizontal" |
| ArrowRight | Moves focus to next step | |
| ArrowUp | Moves focus to previous step | layout="vertical" |
| ArrowDown | Moves focus to next step | |
| Home | Moves focus to the first step | [linear]="false" |
| End | Moves focus to the last step |
This is the content of step 1.