Components
← All components

Focus Scope

stimeo--focus

Puts a focus boundary around any region: Tab cycles inside it and focus returns when you leave.

  • Core

Draws a focus boundary around any region without building a dialog. While it is on, Tab cycles within it, and you can name where focus should land when it starts. Esc releases it, and on release focus returns where it came from. The boundary comes in two strengths: the strong one makes the rest of the page untouchable, while the soft one still cycles Tab but leaves the background reachable. What is focusable inside is counted afresh each time, so anything added later is picked up on the next Tab. It does not open, close, or show an overlay, so pair it with a dialog.

running

Turn it on and press Tab: focus cycles inside the box. Esc or the release button lets you out.

Keyboard

KeyAction
Tab / Shift+Tab Cycle focus within the scope (wraps at the ends).
Escape Release the trap and restore focus to the opener.