React Hookers - v6.3.0
    Preparing search index...

    Interface FocusControls

    Controls that move focus inside a focus scope.

    interface FocusControls {
        focusDown(options?: UnorderedFocusOptions): boolean;
        focusFirst(options?: OrderedFocusOptions): boolean;
        focusLast(options?: OrderedFocusOptions): boolean;
        focusLeft(options?: UnorderedFocusOptions): boolean;
        focusNext(options?: OrderedFocusOptions): boolean;
        focusPrevious(options?: OrderedFocusOptions): boolean;
        focusRight(options?: UnorderedFocusOptions): boolean;
        focusUp(options?: UnorderedFocusOptions): boolean;
        hasFocus(): boolean;
        isActive(): boolean;
    }
    Index

    Methods

    • If the scope contains the currently focused element, moves focus to the closest focusable element below it.

      Parameters

      Returns boolean

      true if an element was focused.

    • Focuses the first focusable element inside a focus scope.

      Parameters

      Returns boolean

      true if an element was focused.

    • Focuses the last focusable element inside a focus scope.

      Parameters

      Returns boolean

      true if an element was focused.

    • If the scope contains the currently focused element, moves focus to the closest focusable element to the left.

      Parameters

      Returns boolean

      true if an element was focused.

    • If the scope contains the currently focused element, focuses the next element in Tab order.

      Parameters

      Returns boolean

      true if an element was focused.

    • If the scope contains the currently focused element, focuses the previous element in Tab order.

      Parameters

      Returns boolean

      true if an element was focused.

    • If the scope contains the currently focused element, moves focus to the closest focusable element to the right.

      Parameters

      Returns boolean

      true if an element was focused.

    • If the scope contains the currently focused element, moves focus to the closest focusable element above it.

      Parameters

      Returns boolean

      true if an element was focused.

    • Returns true if the currently focused element is contained within the scope container.

      Returns boolean

    • Returns true if the scope contains the focused element, or if the scope is part of an active focus trap.

      Returns boolean