Table of Contents

Class FocusManager

Namespace
Velvet
Assembly
Velvet.Docs.dll

Moves focus among the focusable descendants of the focus scope around the component that called Hooks.UseFocusManager, in hierarchy order — React Aria's FocusManager. A field such as a TextField or a Toggle is one element. The scope is the nearest V.FocusScope or FocusScope element prop above the component, a portal's content reaching the scope its portal is declared in. Each method focuses the element it finds and returns it; it returns null, leaving focus where it is, when it finds none or the component is in no scope.

public sealed class FocusManager
Inheritance
object
FocusManager

Methods

FocusFirst(FocusManagerOptions?)

Focuses the scope's first element.

FocusLast(FocusManagerOptions?)

Focuses the scope's last element.

FocusNext(FocusManagerOptions?)

Focuses the scope element after the focused one (or From), or the scope's first when focus is outside the scope.

FocusPrevious(FocusManagerOptions?)

Focuses the scope element before the focused one (or From), or the scope's last when focus is outside the scope.