IActivatorProps

interface
State & Interaction

Contract for components that open/close a floating surface via an activator element — includes pointer, hover, focus and context-menu triggers plus open/close delays.

TypeScript

Definition

The TypeScript interface definition as found in the origam source. Click the copy icon to copy the snippet.

typescript

Inheritance

Extends

Parent interfaces this one inherits from. Their properties are available on every consumer of this interface.

API

Properties

Every property declared by this interface, with its type, optionality and default.

target
'parent' | 'cursor' | TAnyString | Element | ComponentPublicInstance | [x: number, y: number] | undefined
Override the anchor target for positioning the floating surface.
activator
'parent' | 'cursor' | TAnyString | Element | ComponentPublicInstance
Element (or CSS selector) that acts as the activator for the floating surface.
activatorProps
any
Extra props spread onto the activator element (e.g. aria attributes).
openOnClick
boolean
Open the surface when the activator is clicked.
openOnContextMenu
boolean
Open the surface on right-click / context-menu.
openOnHover
boolean
Open the surface when the pointer enters the activator.
openOnFocus
boolean
Open the surface when the activator gains keyboard focus.
closeOnContentClick
boolean
Automatically close the surface when the user clicks anywhere inside its content.

Ecosystem

Used by

Components and composables that extend or consume this interface.

Usage

Examples

Ready-to-paste code snippets using this interface.

Extending the interface on a floating component

typescript