UNPKG

801 BTypeScriptView Raw
1export declare const IsFocusVisibleClassName = "ms-Fabric--isFocusVisible";
2export declare const IsFocusHiddenClassName = "ms-Fabric--isFocusHidden";
3/**
4 * Sets the visibility of focus styling.
5 *
6 * By default, focus styles (the box surrounding a focused Button, for example) only show up when navigational
7 * keypresses occur (through Tab, arrows, PgUp/PgDn, Home and End), and are hidden when mouse interactions occur.
8 * This API provides an imperative way to turn them on/off.
9 *
10 * A use case might be when you have a keypress like ctrl-f6 navigate to a particular region on the page,
11 * and want focus to show up.
12 *
13 * @param enabled - whether to remove or add focus
14 * @param target - optional target
15 */
16export declare function setFocusVisibility(enabled: boolean, target?: Element): void;