diff --git a/packages/react-events/docs/FocusWithin.md b/packages/react-events/docs/FocusWithin.md new file mode 100644 index 00000000000..36bd56c1c61 --- /dev/null +++ b/packages/react-events/docs/FocusWithin.md @@ -0,0 +1,57 @@ +# FocusWithin + +The `FocusWithin` module responds to focus and blur events on its child. Focus events +are dispatched for all input types, with the exception of `onFocusVisibleChange` +which is only dispatched when focusing with a keyboard. + +Focus events do not propagate between `FocusWithin` event responders. + +```js +// Example +const Button = (props) => { + const [ focusWithin, updateFocusWithin ] = useState(false); + const [ focusWithinVisible, updateFocusWithinVisible ] = useState(false); + + return ( + +