@component-driven/react-focus-utils

Utilities to work with `:focus` & `:focus-within` in React

Usage no npm install needed!

<script type="module">
  import componentDrivenReactFocusUtils from 'https://cdn.skypack.dev/@component-driven/react-focus-utils';
</script>

README

react-focus-utils

Release npm

This package includes:

  • FocusWithin component — the missing JS API of the CSS :focus-within for React
  • WithSelector component to allow preview of pseudo-styles like :hover and :focus in styleguides
  • mixins — a collection of mixins for pseudo styles (:focus, :disabled) to work with CSS-in-JS libraries

Documentation