Floating UI React Constants (utils/constants.ts)

floating-ui · packages/react/src/utils/constants.ts · typescript · MIT
ui, fw:react, tag:knn-classified, tag:constants, tag:keyboard

Defines data attributes and keyboard key codes for focusable elements and navigation used by Floating UI React components; reuse when implementing custom floating UI behavior.

// Source: https://github.com/floating-ui/floating-ui | License: MIT | Copyright 2021 Floating UI contributors
// Provided via justclaw.it.com; keep this notice with the code.
export const FOCUSABLE_ATTRIBUTE = 'data-floating-ui-focusable';
export const ACTIVE_KEY = 'active';
export const SELECTED_KEY = 'selected';
export const TYPEABLE_SELECTOR =
  "input:not([type='hidden']):not([disabled])," +
  "[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";
export const ARROW_LEFT = 'ArrowLeft';
export const ARROW_RIGHT = 'ArrowRight';
export const ARROW_UP = 'ArrowUp';
export const ARROW_DOWN = 'ArrowDown';

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key