Skip to main content
Version: Next

FocusScope API

import { FocusScope } from '@editora/ui-react';

Props​

PropTypeDescription
activeboolean
autoFocus'first' | 'selected' | 'container' | 'none'
headlessboolean
inertOthersboolean
loopboolean
onEscape(detail: { originalEvent?: Event }) => void
onFocusScopeMount() => void
restoreFocusboolean
trappedboolean

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