PulsoIcon

Angular

pulsoicon-angular — animated Angular icons as a standalone <pulso-icon> component and an svg[pulsoIcon] directive, with the same props as every PulsoIcon package.

This website can’t run Angular inside its pages; the icons you see here are the web packages playing the same motion. Copy the Angular code for any icon from its page or the playground.

Installation

npm install pulsoicon-angular

Angular 19 or newer. Motion 12 or newer plays the icons and is installed with the package. It works with server-side rendering: the icon is drawn on the server and starts playing in the browser.

Quick start

Import PulsoIconComponent and the icons you use, and expose each icon to the template:

import { Component } from "@angular/core";
import { Bell, Calendar, PulsoIconComponent, Trash2 } from "pulsoicon-angular";

@Component({
  selector: "app-toolbar",
  imports: [PulsoIconComponent],
  template: `
    <button><pulso-icon [icon]="Bell" size="20" /> Notifications</button>
    <button><pulso-icon [icon]="Calendar" /> Schedule</button>
    <button><pulso-icon [icon]="Trash2" color="crimson" strokeWidth="1.5" /> Delete</button>
  `,
})
export class Toolbar {
  protected readonly Bell = Bell;
  protected readonly Calendar = Calendar;
  protected readonly Trash2 = Trash2;
}

<pulso-icon> takes no room of its own (display: contents), so the <svg> sits in your layout as if you had written it.

Your own <svg>: the directive

To keep your own attributes, classes and styles on the <svg>, use PulsoIconDirective instead:

<svg pulsoIcon [icon]="Bell" size="20" class="toolbar-icon"></svg>

Inputs

icon (required), size (24), color (currentColor), strokeWidth (2), absoluteStrokeWidth (false), solid (false), animated (true), autoAnimated (true) and play, as in React, plus label: with a label the icon becomes role="img" with that name instead of aria-hidden. Boolean inputs work as bare attributes (solid) or bound ([solid]="isActive()").

Outline, solid and static

<pulso-icon [icon]="Heart" />
<pulso-icon [icon]="Heart" solid />
<pulso-icon [icon]="Heart" [animated]="false" />
<pulso-icon [icon]="Heart" solid [animated]="false" />

Play from code

#name="pulsoIcon" gives startAnimation() and stopAnimation(); both return a promise that resolves when the motion has finished.

<button (click)="check.startAnimation()">
  <pulso-icon #check="pulsoIcon" [icon]="Check" [autoAnimated]="false" /> Save
</button>

From the class, viewChild(PulsoIconComponent) gives the same handle.

Driven by state

<pulso-icon [icon]="Bell" [autoAnimated]="false" [play]="hasNewMessage()" />

Loading icons on demand

pulsoicon-angular/all exports every icon’s data by kebab-case name (all of them). pulsoicon-angular/names lists the names without loading any icon:

import { ICON_NAMES, type IconName } from "pulsoicon-angular/names";

Accessibility

Icons render with aria-hidden="true" unless you give them a label; otherwise label the button or link they sit in. Nothing moves when the system asks for reduced motion.

All 9,955 Angular icons by category

Search all icons