FocusableHandle
Base handle shared by all focusable elements
Extended by
Section titled “Extended by”ButtonHandleInputHandleSelectHandleCheckboxHandleRadioHandleListHandleImageHandleLinkHandleTextHandle
Methods
Section titled “Methods”blur()
Section titled “blur()”blur(): void;Programmatically blur (unfocus) this element
Returns
Section titled “Returns”void
focus()
Section titled “focus()”focus(): void;Programmatically focus this element
Returns
Section titled “Returns”void
scrollIntoView()
Section titled “scrollIntoView()”scrollIntoView(options?): void;Scroll the nearest parent ScrollView to make this element visible.
Behaves like the DOM Element.scrollIntoView() method.
No-op if the element is not inside a ScrollView.
Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
options? | ScrollIntoViewOptions | Alignment options (default: { block: "nearest" }) |
Returns
Section titled “Returns”void
Example
Section titled “Example”const inputRef = useRef<InputHandle>(null);
// Minimal scroll — just enough to make it visibleinputRef.current?.scrollIntoView();
// Center the element in the viewportinputRef.current?.scrollIntoView({ block: "center" });Properties
Section titled “Properties”| Property | Modifier | Type | Description |
|---|---|---|---|
isFocused | readonly | boolean | Whether this element is currently focused |