Installation
Install only the icons package. It includes the default Lucide registry and the CSP-compatible renderer.
pnpm
bash
pnpm add @tailng-ui/iconsnpm
bash
npm install @tailng-ui/iconsyarn
bash
yarn add @tailng-ui/icons@tailng-ui/icons provides a lazy-loading icon system with built-in Lucide support and an extensible pack API for any SVG icon set.
Install only the icons package. It includes the default Lucide registry and the CSP-compatible renderer.
pnpm add @tailng-ui/iconsnpm install @tailng-ui/iconsyarn add @tailng-ui/icons Call provideTngIcons() in your application config. With no arguments, Lucide is registered as the default pack.
// app.config.ts
import { ApplicationConfig } from '@angular/core';
import { provideTngIcons } from '@tailng-ui/icons';
export const appConfig: ApplicationConfig = {
providers: [
provideTngIcons(), // uses Lucide by default
],
}; Import TngIcon and use the <tng-icon> element. Icons load lazily on first use.
<!-- decorative icon alongside text (aria-hidden by default) -->
<tng-icon icon="home" size="1.25rem" />
<!-- meaningful standalone icon with accessible label -->
<tng-icon icon="search" label="Search" size="1.25rem" />
<!-- kebab-case and camelCase icon names are both supported -->
<tng-icon icon="arrow-right" size="1rem" />
<tng-icon icon="arrowRight" size="1rem" /> Icon names can be plain, resolved against the default pack, or prefixed with pack-name: to reference a specific pack.
<!-- no prefix -> uses the default pack (lucide) -->
<tng-icon icon="star" />
<!-- explicit pack:name syntax -->
<tng-icon icon="lucide:star" />
<tng-icon icon="bootstrap:star-fill" />
<tng-icon icon="flags:us" />