Click or press Tab to move focus to any React element using this abstract component that normalizes the focus behavior across browsers.
npm install ariakit
Learn more in Getting started.
You can style the focus-visible state of Focusable elements using the data-focus-visible attribute. This is similar to the :focus-visible pseudo-class, but it also supports composite widgets with virtualFocus:
outline: 2px solid red;
Learn more in Styling.