Skip to content

feat(packages/angular): add new @lucide/angular package#3897

Merged
ericfennis merged 42 commits intonextfrom
angular-package
Mar 20, 2026
Merged

feat(packages/angular): add new @lucide/angular package#3897
ericfennis merged 42 commits intonextfrom
angular-package

Conversation

@karsa-mistmere
Copy link
Copy Markdown
Member

@karsa-mistmere karsa-mistmere commented Dec 19, 2025

Description

Adds new standalone-first Angular package that better matches the ecosystem established by lucide-react:

  • one standalone component per icon
  • dynamic icon component with IconNode/name input that accepts:
    • icon components
    • icon nodes from the lucide/@lucide/icons packages
    • icon names for icons provided through provideLucideIcons via dependency injection
  • default icon configuration provided through provideLucideConfig via dependency injection
  • support for all configuration options established in earlier packages
  • support for providing an accessible label via an <svg:title> element. Unless this accessible label is provided, the SVGs will automatically add aria-hidden="true"

TODO

  • Add package documentation to site
  • Add more documentation to code
  • Explore the possibility of a migration schematic from lucide-angular

TODO, but requires #3881

Before Submitting

@github-actions github-actions Bot added the 📦 dependencies Pull requests that update a dependency file label Dec 19, 2025
@github-actions github-actions Bot added 📖 documentation Improvements or additions to documentation 🌍 site Has to do something with the Lucide website labels Dec 19, 2025
@ericfennis ericfennis changed the base branch from main to next December 22, 2025 07:09
@ericfennis ericfennis requested a review from Copilot December 22, 2025 07:10
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR introduces a new modern Angular package @lucide/angular that replaces the legacy lucide-angular package with a standalone-first, signal-based implementation optimized for Angular 17+.

Key changes:

  • Adds a new @lucide/angular package with standalone components, dependency injection providers, and signal-based reactive architecture
  • Introduces per-icon components for better tree-shaking alongside a dynamic LucideIcon component
  • Updates build tooling to support non-default exports and Angular-specific configuration needs

Reviewed changes

Copilot reviewed 53 out of 56 changed files in this pull request and generated 10 comments.

Show a summary per file
File Description
packages/angular/* New Angular package with standalone components, types, utilities, tests, and documentation
tools/build-icons/** Enhanced build tooling to support Angular's export requirements and alias handling
packages/lucide-react-native/** Refactored exports and added icons entry point for better module organization
docs/guide/packages/angular.md New comprehensive documentation for @lucide/angular
docs/guide/packages/lucide-angular.md Updated legacy package docs with deprecation notice
icons/toolbox.* New toolbox icon addition
icons/paint-bucket.svg Updated paint-bucket icon paths
.github/workflows/angular.yml New CI workflow for Angular package testing

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread packages/angular/src/lucide-config.ts Outdated
Comment thread docs/guide/packages/lucide-angular.md Outdated
Comment thread packages/angular/src/lucide-icons.ts Outdated
Comment thread packages/angular/package.json Outdated
Comment thread packages/angular/src/lucide-dynamic-icon.spec.ts Outdated
Comment thread packages/angular/scripts/exportTemplate.mts Outdated
Comment thread packages/angular/tsconfig.json
Comment thread packages/angular/src/lucide-icons.ts Outdated
Comment thread packages/angular/MIGRATION.md Outdated
Comment thread packages/angular/README.md Outdated
@github-actions github-actions Bot added 🎨 icon About new icons ⚛️ react native package About the React Native package labels Dec 22, 2025
Copy link
Copy Markdown
Member

@ericfennis ericfennis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggestions and ideas, I've checked the type naming with other libraries. Would be nice if we could make it consistent.

Comment thread packages/angular/src/types.ts Outdated
…rom separate node+name – no more toKebabCase hackery

feat(packages/angular): renamed LucideIconComponentType => LucideIcon, and LucideIcon => LucideDynamicIcon
feat(packages/angular): added backwards compatible CSS class support
feat(packages/angular): switched to vector-effect: non-scaling-stroke implementation from computed stroke width
feat(packages/angular): rewrote icon provider to only accept a list of self-described icons – no more toKebabCase hackery & as an added bonus automatic backwards compatible alias support 🚀
feat(packages/angular): added legacy icon node helper function for passing legacy icons to providers
test(packages/angular): added unit tests on LUCIDE_CONFIG provider usage
@karsa-mistmere
Copy link
Copy Markdown
Member Author

@ericfennis: added some extensive rewrites:

  • as per feat(packages/angular): add new @lucide/angular package #3897 (comment), I switched from separate node+name to self-describing LucideIconData objects similar to @lucide/icons – so no more toKebabCase hackery anywhere in the code apart from some legacy helpers, and as an added bonus there is now backwards compatible alias support for name based icon providers 🚀
  • as per feat(packages/angular): add new @lucide/angular package #3897 (comment) I renamed LucideIconComponentType => LucideIcon, and LucideIcon => LucideDynamicIcon
  • I added backwards compatible CSS class support as already implemented in @lucide/icons
  • I switched to the vector-effect: non-scaling-stroke implementation from using computed stroke widths
  • as requested, I added some unit tests on LUCIDE_CONFIG provider usage

@ericfennis
Copy link
Copy Markdown
Member

@karsa-mistmere Awesome work!

# Conflicts:
#	.github/ISSUE_TEMPLATE/02_bug_report.yml
#	.github/ISSUE_TEMPLATE/04_feature_request.yml
#	pnpm-lock.yaml
#	tools/build-icons/building/generateIconFiles.ts
#	tools/build-icons/types.ts
karsa-mistmere and others added 2 commits March 13, 2026 12:49
…nction, refactor export template to use the iconData object as defined in ExportTemplate
@ericfennis ericfennis marked this pull request as ready for review March 20, 2026 12:05
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 53 out of 54 changed files in this pull request and generated 11 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread packages/angular/src/public-api.ts
Comment on lines +13 to +39
/**
* Provide Lucide icons by name.
*
* @remarks
* Warning! This provider will convert dictionary keys to lower-kebab-case.
*
* @param icons Either a dictionary of icons or a list of Angular icon components.
*
* @usage
* ```ts
* import { provideLucideIcons, SquareCheck } from '@lucide/angular';
* import { MyCustomIcon } from './custom-icons/my-custom-icon';
*
* providers: [
* provideLucideIcons({
* SquareCheck,
* MyCustomIcon, // LucideIconData
* }),
* ]
* ```
*
* ```html
* <svg lucideIcon="my-custom-icon" />
* ```
*/
export function provideLucideIcons(...icons: Array<LucideIcon | LucideIconData>): Provider {
return {
Copy link

Copilot AI Mar 20, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The provideLucideIcons JSDoc is inconsistent with the actual API: it claims it accepts a dictionary and converts keys to lower-kebab-case, but the function signature is variadic and the implementation only uses iconData.name/aliases as-is. Either update the docs/examples to call provideLucideIcons(icon1, icon2, ...) (or ...array) and remove the kebab-case warning, or change the function to actually accept a dictionary/array as documented.

Copilot uses AI. Check for mistakes.
Comment thread docs/guide/packages/angular.md
@Component({
templateUrl: './foobar.html',
// For using by name via provider:
providers: [provideLucideIcons({ coconut })],
Copy link

Copilot AI Mar 20, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This snippet uses providers: [provideLucideIcons({ coconut })], but provideLucideIcons does not accept an object map in the current implementation (it expects LucideIcon | LucideIconData arguments). Either change the example to pass the icon data directly (and/or spread an array), or update provideLucideIcons to support object maps as documented.

Suggested change
providers: [provideLucideIcons({ coconut })],
providers: [provideLucideIcons(coconut)],

Copilot uses AI. Check for mistakes.
Comment thread packages/angular/MIGRATION.md Outdated
Comment thread packages/angular/.vscode/launch.json
Comment thread .github/labeler.yml
Comment thread packages/angular/src/types.ts
Comment thread docs/guide/packages/angular.md Outdated
Comment thread tools/build-icons/cli.ts
@ericfennis ericfennis merged commit a0e202d into next Mar 20, 2026
32 checks passed
@ericfennis ericfennis deleted the angular-package branch March 20, 2026 14:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🚀 astro package 📦 dependencies Pull requests that update a dependency file 📖 documentation Improvements or additions to documentation 🎨 icon About new icons 🧳 lucide package About the lucide package 🫧 metadata Improved metadata ⚛️ preact package About the Preact Package ⚛️ react native package About the React Native package ⚛️ react package Lucide React Package 🌍 site Has to do something with the Lucide website 🪝 solid package About the Solid package 🧣 svelte package About the Svelte package 💎 vue package Lucide Vue package

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants