Skip to content

Interface: FocusGroup ​

Defined in: packages/sdk/src/use-focus-group.ts:101

The headless focus-group controller useFocusGroup returns.

Properties ​

containerProps ​

ts
containerProps: FocusGroupContainerProps;

Defined in: packages/sdk/src/use-focus-group.ts:103

Spread on the group container.


getItemProps ​

ts
getItemProps: (index) => FocusGroupItemProps;

Defined in: packages/sdk/src/use-focus-group.ts:105

Spread on item index.

Parameters ​

index ​

number

Returns ​

FocusGroupItemProps


activeIndex ​

ts
activeIndex: number;

Defined in: packages/sdk/src/use-focus-group.ts:107

The item that currently holds (or, when unfocused, would receive) focus.


focusItem ​

ts
focusItem: (index) => void;

Defined in: packages/sdk/src/use-focus-group.ts:109

Imperatively move focus to an item (e.g. ↓ from a search box into a list).

Parameters ​

index ​

number

Returns ​

void