Skip to main content

Function: useFocusGroupItem()

useFocusGroupItem(params?): UseFocusGroupItemResult

Defined in: src/widgets/utility/focusGroup.tsx:117

Hook to render a focusable item inside FocusGroup.

Focusable item allows multiple "tab-indexable" sub-children inside reachable via Tab key when the item is focused. When moving focus with FocusGroupController.focusNext and other methods, the first "tab-indexable" sub-child would be focused.

Focusable item element *must use provided ref to properly maintain the focusable state.

Parameters

ParameterTypeDescription

params?

{ active?: boolean; debugLabel?: string | number; }

params.active?

boolean

Sets the group item to be "active" as opposed to "disabled".

Only active items can be focused with FocusGroupController methods.

params.debugLabel?

string | number

Internal item label for debugging purposes.

Returns

UseFocusGroupItemResult

See

FocusGroup