Skip to content

Commit cbf248d

Browse files
committed
docs(react-icons): promote headless API from preview to stable
- 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.
1 parent 093de10 commit cbf248d

5 files changed

Lines changed: 6 additions & 15 deletions

File tree

packages/docsite/stories/Icons/UserGuidance.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ import { Meta } from '@storybook/addon-docs/blocks';
2323
| **Loading** | Bundled with JS — no flash | FOIT / FOUT risk during font load | One request per sprite group; webpack plugin can merge into a single request |
2424
| **Setup** | None (default) | Webpack subsetting plugin, static assets hosting (font) | Webpack subsetting plugin, static assets hosting (sprite), same-origin proxy for CDN |
2525

26-
> **Note:** A **headless** rendering mode (vanilla CSS, no Griffel runtime) is available as an alpha opt-in via `/headless/*` imports (e.g. `@fluentui/react-icons/headless/svg/access-time`). With CSS extraction it reduces JS bundle sizes significantly — up to −70% for font icons, −56% for SVG sprites, −14% for inline SVG. This table will be updated once the headless API ships in stable.
26+
> **Note:** A **headless** rendering mode (vanilla CSS, no Griffel runtime) is available via `/headless/*` imports (e.g. `@fluentui/react-icons/headless/svg/access-time`). With CSS extraction it reduces JS bundle sizes significantly — up to −70% for font icons, −56% for SVG sprites, −14% for inline SVG. See the [Headless API documentation](https://github.com/microsoft/fluentui-system-icons/blob/main/packages/react-icons/docs/headless.md) for details.
2727
2828
### When to use inline SVG (default)
2929

packages/react-icons/README.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -348,13 +348,11 @@ SVG sprites offer smaller bundles, faster renders, and zero runtime overhead.
348348

349349
👉 **[Full documentation →](./docs/preview-features/svg-sprites.md)**
350350

351-
## Headless API — ⚠️ Alpha
352-
353-
> **This feature is available as an alpha prerelease only.** Install via `npm i @fluentui/react-icons@alpha`
351+
## Headless API
354352

355353
A drop-in replacement for the standard API that removes the CSS-in-JS runtime — provides data-attribute selectors for styling behaviour with opt-in pre-defined vanilla CSS.
356354

357-
👉 **[Full documentation →](./docs/preview-features/headless.md)**
355+
👉 **[Full documentation →](./docs/headless.md)**
358356

359357
## Viewing Icons
360358

packages/react-icons/docs/preview-features/headless.md renamed to packages/react-icons/docs/headless.md

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
11
# Headless API
22

3-
> **⚠️ Alpha** — this feature is available as an alpha prerelease only.
4-
>
5-
> Install via `npm i @fluentui/react-icons@prerelease`
6-
73
The Headless API is a drop-in replacement for the standard icon API that removes the CSS-in-JS runtime dependency. It provides `data-*` attribute selectors for styling behaviour with opt-in pre-defined vanilla CSS — making it suitable for any React setup, including those without a CSS-in-JS runtime.
84

95
## Benefits
@@ -93,7 +89,7 @@ function MyComponent() {
9389
}
9490
```
9591

96-
> **Same-origin requirement:** Sprite files must be served from the same origin as your application. See the [SVG Sprites same-origin section](./svg-sprites.md#same-origin-requirement) for details.
92+
> **Same-origin requirement:** Sprite files must be served from the same origin as your application. See the [SVG Sprites same-origin section](./preview-features/svg-sprites.md#same-origin-requirement) for details.
9793
9894
### Font Icons
9995

@@ -181,4 +177,4 @@ Use `headless/svg` as the target path (or `headless/svg-sprite` for sprites, `he
181177

182178
> **Note:** You still need to manually add the CSS import (`import '@fluentui/react-icons/headless/styles.css'`) to your application entry point — build transforms only rewrite component imports.
183179
184-
👉 **[Build-Time Transform setup (Babel & SWC) →](../build-transforms.md)**
180+
👉 **[Build-Time Transform setup (Babel & SWC) →](./build-transforms.md)**

packages/react-icons/docs/preview-features/README.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,3 @@
77
## [Atomic API (SVG Sprites)](./svg-sprites.md)
88

99
SVG sprites offer smaller bundles, faster renders, and zero runtime overhead.
10-
11-
## [Headless API](./headless.md)
12-
13-
A drop-in replacement for the standard API that removes the CSS-in-JS runtime — provides data-attribute selectors for styling behaviour with opt-in pre-defined vanilla CSS.

packages/react-icons/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@
6464
"files": [
6565
"docs/preview-features/*.md",
6666
"docs/build-transforms.md",
67+
"docs/headless.md",
6768
"lib/",
6869
"lib-cjs/"
6970
],

0 commit comments

Comments
 (0)