[v6] New Package Architecture and Release Progress
Overview
React Icons v6 introduces a new package architecture that gives users more control over which icon sets and modules they install.
This issue serves as both an announcement of the major changes planned for v6 and a place to track the release progress.
New package architecture
React Icons v6 will provide three package formats:
1. The existing react-icons package
The existing package will continue to provide all icon sets:
import { FaBeerMugEmpty } from "react-icons/fa6";2. Packages for individual icon sets
Each icon set will also be published as a separate scoped package:
npm install @react-icons/fontawesome6import { FaBeerMugEmpty } from "@react-icons/fontawesome6";This allows applications to install only the icon sets they use instead of depending on the complete react-icons package.
Shared components and utilities, including IconContext, are provided by @react-icons/core.
This change addresses #992 by making each icon set available as an independently installable package.
3. Packages containing individual icon modules
For environments that work better with one module per icon, each icon set will also have a _files package:
npm install @react-icons/fontawesome6_filesimport { FaBeerMugEmpty } from "@react-icons/fontawesome6_files/FaBeerMugEmpty";These packages replace the need for a single @react-icons/all-files package.
Publishing the file-based packages separately for each icon set also addresses #593. New and updated icon sets can be published together with their corresponding packages without relying on a separately maintained monolithic @react-icons/all-files release.
Benefits
- Install only the icon sets required by an application
- Reduce unnecessary dependencies and package size
- Provide clearer package boundaries
- Support both icon-set-level and individual-file imports
- Keep icon packages synchronized when new icon sets or icons are added
- Preserve the existing
react-icons/<icon-set>import style for users who prefer the current package
Progress
- Extract shared runtime components into
@react-icons/core - Generate separate packages for each icon set
- Generate separate
_filespackages for individual icon imports - Update documentation and examples for the new package formats
- Complete package and compatibility testing
- Publish a prerelease version
- Collect feedback and resolve remaining issues
- Release React Icons v6
Feedback on the new package structure, naming conventions, and migration experience is welcome.
Source: react-icons/react-icons