Component registry
Keyboard behavior
Shared focus, Escape and inset rules for controls near the screen edge.
Live web demo
Tab moves forward; Escape closes a menu or sheet and returns focus.
Web source: openvibe-shared/kit-web · Shared focus and form handling
Anatomy
- focusactive input
- insetvisible keyboard space
- dismissreturn path
Props
focused- boolean
returnFocus- string?
Behavior and accessibility
- States
- idle · keyboard-open · dismissed
- Tokens
- size.tap · space.md
- Keyboard
- Keeps the focused control in view
- Outside tap
- No dismissal
- Scroll lock
- Page remains scrollable
- Reduced motion
- Remove movement; keep the state change.
- Accessibility
- Keyboard behavior. Keep the focused control visible; dismiss without losing the place. At least 44 × 44 dp or pt for every touch action.
Android · Jetpack Compose
Use WindowInsets.ime and bringIntoViewRequester for focused fields.
Material 3 container: Surface
iOS · SwiftUI
Use safeAreaInset and FocusState; scroll the focused field into view.
Example definition
{
"schema": "design.component@1",
"name": "keyboard",
"props": {
"focused": true
}
}