Skip to main content

@lexical/react/useLexicalRovingTabIndexRef

Functions​

useLexicalRovingTabIndexRef()​

useLexicalRovingTabIndexRef(options?): RefCallback<HTMLElement>

Defined in: packages/lexical-react/src/useLexicalRovingTabIndexRef.ts:34

Returns a RefCallback that registers the attached DOM element as a roving-tabindex container with RovingTabIndexExtension, and releases it when the element detaches.

const rovingRef = useLexicalRovingTabIndexRef();
return <div ref={rovingRef} role="toolbar">…</div>;

Multiple elements can use this hook simultaneously — each gets its own independent roving group.

Requires RovingTabIndexExtension in the editor's extension tree.

Parameters​

options?​

RovingTabIndexOptions = {}

Returns​

RefCallback<HTMLElement>

References​

RovingOrientation​

Re-exports RovingOrientation


RovingTabIndexOptions​

Re-exports RovingTabIndexOptions