Skip to content

Instantly share code, notes, and snippets.

Tooltip

Tooltip is a non-interactive overlay that briefly explains the function of the trigger element.

Functionality

  • Displayed when the trigger element is hovered by the mouse or when it receives keyboard focus.

  • Focus remains on the trigger element while the tooltip is displayed.

@raunofreiberg
raunofreiberg / machine.js
Created January 21, 2021 16:02
Generated by XState Viz: https://xstate.js.org/viz
const CHANGE_ACTION = {
target: 'FILTERING',
actions: assign({
selectedIndex: 0, // Highlight the first match
inputValue: (_, event) => event.inputValue
})
}
const NAVIGATE_ACTION = {
target: 'NAVIGATING',