# @fluentui-contrib/react-headless-provider

> A package that provides a headless provider, a replacement in some cases for `FluentProvider` from `@fluentui/react-components`.

Latest version **1.0.6** (published 2025-11-18) · MIT license · 0 weekly downloads

## Install

```sh
npm install @fluentui-contrib/react-headless-provider
pnpm add @fluentui-contrib/react-headless-provider
yarn add @fluentui-contrib/react-headless-provider
bun add @fluentui-contrib/react-headless-provider
```

## Health

**Score 60/100 (C)** — status: stable.

Positive: has types; esm support; no vulnerabilities; high maintenance score.

Warnings: low downloads.

## Facts

| | |
|---|---|
| Version | 1.0.6 |
| Published | 2025-11-18 |
| First published | 2023-10-25 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 1 |
| Unpacked size | 17.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 56 |
| Maintainers | uifabricteam |

## Links

- npm: https://www.npmjs.com/package/@fluentui-contrib/react-headless-provider
- Repository: https://github.com/microsoft/fluentui-contrib
- Homepage: https://github.com/microsoft/fluentui-contrib#readme
- Issues: https://github.com/microsoft/fluentui-contrib/issues
- npm.io page: https://npm.io/package/@fluentui-contrib/react-headless-provider

## Dependencies (1)

- [@swc/helpers](https://npm.io/package/@swc/helpers.md) ~0.5.11

## Recent versions

- 1.0.6 (latest) — 2025-11-18
- 1.0.5 — 2025-10-01
- 1.0.4 — 2025-09-22
- 1.0.3 — 2025-04-10
- 1.0.2 — 2024-01-31
- 1.0.1 — 2023-12-08
- 1.0.0 — 2023-10-25

## README

# @fluentui/react-headless-provider

A package that provides a headless provider, a replacement in some cases for `FluentProvider` from `@fluentui/react-components`.

`HeadlessFluentProvider` does not render additional any DOM elements, only applies React Contexts needed for components from `@fluentui/react-components` to render properly.

Following features work:

- rendering into different documents i.e. `targetDocument` prop
- `customStyleHooks_unstable` & `overrides_unstable` props

Following features don't work:

- scoped theming, in this scenario theming should be configured globally or separately
- scoped "dir", in this scenario text direction should be configured globally or separately
- polyfill for `:focus-visible` (`useFocusVisible()` from `@fluentui/react-tabster`) should be initialized separately

Designed to be used with [`createCSSRuleFromTheme()`](https://github.com/microsoft/fluentui/pull/29052), see for context [microsoft/fluentui#21290](https://github.com/microsoft/fluentui/issues/21290).

## Install

```sh
yarn add @fluentui-contrib/react-headless-provider
# or
npm install @fluentui-contrib/react-headless-provider
```

## Usage

```tsx
import * as React from 'react';
import { HeadlessFluentProvider } from '@fluentui-contrib/react-headless-provider';

export function RootContainer(props) {
  const { targetDocument } = props;

  return <HeadlessFluentProvider targetDocument={targetDocument}>{/* children */}</HeadlessFluentProvider>;
}
```

---
_Source: https://npm.io/package/@fluentui-contrib/react-headless-provider · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
