--- category: Elements --- # useActiveElement Reactive `document.activeElement` ## Usage ```vue ``` ## Component Usage ```vue ``` ## Type Declarations ```ts export interface UseActiveElementOptions extends ConfigurableWindow, ConfigurableDocumentOrShadowRoot { /** * Search active element deeply inside shadow dom * * @default true */ deep?: boolean /** * Track active element when it's removed from the DOM * Using a MutationObserver under the hood * @default false */ triggerOnRemoval?: boolean } /** * Reactive `document.activeElement` * * @see https://vueuse.org/useActiveElement * @param options * * @__NO_SIDE_EFFECTS__ */ export declare function useActiveElement( options?: UseActiveElementOptions, ): ShallowRef export type UseActiveElementReturn = ReturnType ```