# react-focus-marshal

> Traps focus within a DOM node — subsequently mounted traps will pause others and take focus responsibility until they unmount.

Latest version **1.0.1** (published 2018-06-07) · MIT license · 0 weekly downloads

## Install

```sh
npm install react-focus-marshal
pnpm add react-focus-marshal
yarn add react-focus-marshal
bun add react-focus-marshal
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.1 |
| Published | 2018-06-07 |
| First published | 2018-06-07 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 246.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | jossmac |
| Keywords | react, focus, trap, a11y |

## Links

- npm: https://www.npmjs.com/package/react-focus-marshal
- Homepage: https://jossmac.github.io/react-focus-marshal
- Issues: https://github.com/jossmac/react-focus-marshal/issues
- npm.io page: https://npm.io/package/react-focus-marshal

## Dependencies (2)

- [focus-trap](https://npm.io/package/focus-trap.md) ^2.4.5
- [react-node-resolver](https://npm.io/package/react-node-resolver.md) ^2.0.0

## Alternatives

- [mobx-react](https://npm.io/package/mobx-react.md) — 2.8M weekly downloads
- [rc-tree](https://npm.io/package/rc-tree.md) — 2.6M weekly downloads
- [@react-oauth/google](https://npm.io/package/@react-oauth/google.md) — 1.3M weekly downloads
- [@wagmi/connectors](https://npm.io/package/@wagmi/connectors.md) — 877.0K weekly downloads
- [vee-validate](https://npm.io/package/vee-validate.md) — 836.4K weekly downloads

## Recent versions

- 1.0.1 (latest) — 2018-06-07
- 1.0.0 — 2018-06-07

## README

# Focus Marshal

Traps focus within a DOM node — subsequently mounted traps will pause others and take focus responsibility until they unmount.

```jsx
import { FocusTrap, FocusMarshal } from 'react-focus-marshal';

const Modal = () => (
  <FocusTrap>
    <div>
      {/* modal content */}
    </div>
  </FocusTrap>
);

const App = () => (
  <FocusMarshal>
    <Modal />
  </FocusMarshal>
);
```

---
_Source: https://npm.io/package/react-focus-marshal · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
