Skip to content

feat(react-icons): propagate headless/ API to stable#1119

Merged
Hotell merged 5 commits into
microsoft:mainfrom
Hotell:react-icons/prepare-headless-for-release
Jun 29, 2026
Merged

feat(react-icons): propagate headless/ API to stable#1119
Hotell merged 5 commits into
microsoft:mainfrom
Hotell:react-icons/prepare-headless-for-release

Conversation

@Hotell

@Hotell Hotell commented Jun 19, 2026

Copy link
Copy Markdown
Collaborator

Summary

Prepares the headless icon API for a stable release.

Commits

  • refactor(react-icons): rename headless CSS files to generic styles.css
    • headless/headless.cssheadless/styles.css
    • headless/headless-fonts.cssheadless/fonts/styles.css
  • feat(react-icons): enable headless icon generation (SVG + fonts, no sprites)
    • convert:svg / convert:fonts opt into headless atoms via --headless
    • headless sprites remain opt-in via --headlessSpriteDest
  • feat(react-icons): add @fluentui/react-icons/headless/utils endpoint
    • mirrors @fluentui/react-icons/utils so a future atomic-loader headless mode can route utility imports to the headless implementations (no wrapIcon by design)
  • test(react-icons): add headless bundle-size fixtures (single SVG, single font, bundleIcon)
  • docs(react-icons): promote the headless API from preview to stable
    • move docs/preview-features/headless.mddocs/headless.md, drop alpha/prerelease banners, update README + storybook note (SVG sprites stay alpha)

Notes

  • SVG sprites remain an alpha feature and are intentionally left unchanged.
  • Atomic webpack loader changes for /headless/ are intentionally deferred.

Draft — opened for review/CI while the work settles.

@Hotell Hotell changed the title feat(react-icons): stabilize headless API feat(react-icons): propagate headless/ API to stable Jun 19, 2026
"import": "./lib/providers.js",
"require": "./lib-cjs/providers.js"
},
"./headless": {

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

note, this exist purerly for "api" aligment , it doesn't export icon chunks as current default barrel. this is by design. the direct consumption is not supported -> only atomic imports

import {AddFilled} from '@fluentui/react-icons/headless' -> 💣 in runtime/during build

@github-actions

github-actions Bot commented Jun 19, 2026

Copy link
Copy Markdown

📋 PR Validation Summary

Check the Build react library job summary for detailed reports:

  • 📦 Bundle Size — size comparison against the base branch
  • 📖 Docsite Preview — build artifact with local preview instructions

To view: click the link above → select the Build react library job → open the Summary tab.

@Hotell Hotell changed the title feat(react-icons): propagate headless/ API to stable feat(react-icons): propagate headless/ API to stable Jun 19, 2026
@Hotell Hotell marked this pull request as ready for review June 19, 2026 12:59
@Hotell Hotell requested review from a team as code owners June 19, 2026 12:59
Hotell added 5 commits June 29, 2026 15:25
- src/headless/headless.css -> styles.css
- src/headless/fonts/headless-fonts.css -> fonts/styles.css
- update export map, sideEffects, build-verify test and docs

BREAKING CHANGE: headless CSS import paths changed
  '@fluentui/react-icons/headless/headless.css' -> '.../headless/styles.css'
  '@fluentui/react-icons/headless/headless-fonts.css' -> '.../headless/fonts/styles.css'
…prites)

- convert:svg / convert:fonts: pass --headless to opt into headless atoms
- convert.js: gate headless block on per-icon dest only so per-icon
  generation runs independently of sprites (sprite dest stays optional)
- build.js: only add ./headless/svg-sprite/* export when those atoms exist

Headless SVG sprites remain opt-in via --headlessSpriteDest.
Adds '@fluentui/react-icons/headless/utils' mirroring '@fluentui/react-icons/utils'
for the headless API, so a future atomic-loader headless mode can route utility
imports (bundleIcon, createFluentIcon, useIconState, class-name constants) to the
headless implementations instead of the Griffel ones.

- src/headless/utils.ts: new utils-only entry (no wrapIcon by design)
- build.js: add ./headless/utils to the headless export map
- build-verify: assert utils.js/.d.ts are emitted

Loader changes intentionally deferred.
Adds monosize fixtures for the headless API (single SVG, single font, and
bundleIcon) so headless bundle size is tracked alongside the Griffel fixtures.
- move docs/preview-features/headless.md -> docs/headless.md (fix relative links)
- drop the alpha/prerelease banners from the headless doc and README section
- remove headless from the preview-features index (SVG sprites stays alpha)
- publish docs/headless.md via package.json files
- update docsite UserGuidance note to stable wording

SVG sprites remain alpha and are intentionally left unchanged.
@Hotell Hotell force-pushed the react-icons/prepare-headless-for-release branch from cbf248d to d8d9bab Compare June 29, 2026 13:25
@Hotell Hotell merged commit 1132d25 into microsoft:main Jun 29, 2026
5 checks passed
@Hotell Hotell deleted the react-icons/prepare-headless-for-release branch June 29, 2026 13:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants