Skip to content

react-aria-components / FocusRing #5028

Closed Answered by reidbarber
rolanday asked this question in Q&A
Discussion options

You must be logged in to vote

All focusable components should have the focus-visible state available.

Button example: https://react-spectrum.adobe.com/react-aria/Button.html#styling

This means that the data-focus-visible attribute added when the element is keyboard focused. You can also use render props to access isFocusVisible, and conditionally render classes or components. This is essentially what FocusRing/useFocusRing do, so you shouldn't need to add FocusRing around any of the RAC components.

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by rolanday
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants