FocusScope API
import { FocusScope } from '@editora/ui-react';
Props
| Prop | Type | Description |
|---|---|---|
active | boolean | |
autoFocus | 'first' | 'selected' | 'container' | 'none' | |
headless | boolean | |
inertOthers | boolean | |
loop | boolean | |
onEscape | (detail: { originalEvent?: Event }) => void | |
onFocusScopeMount | () => void | |
restoreFocus | boolean | |
trapped | boolean |
Also accepts the standard HTML and React props of the element it renders (className, style, id, aria-*, data-*, event handlers).
Element: <ui-focus-scope>
FocusScope renders the ui-focus-scope custom element from @editora/ui-core, which can also be used without React.
Attributes: active, auto-focus, headless, inert-others, loop, restore-focus, trapped
Events: escape, focus-scope-mount