Skip to content
On this page

Module: features/tooltips/tooltip

Interfaces

BaseTooltip

BaseTooltip: Object

The properties that are added onto a processed TooltipOptions to create an Tooltip.

NameType
pinned?Ref<boolean>

Defined in

profectus/src/features/tooltips/tooltip.ts:47


TooltipOptions

TooltipOptions: Object

An object that configures a Tooltip.

NameTypeDescription
classes?Computable<Record<string, boolean>>Dictionary of CSS classes to apply to this feature.
direction?Computable<Direction>The direction in which to display the tooltip
displayComputable<CoercableComponent>The text to display inside the tooltip.
pinnable?booleanWhether or not this tooltip can be pinned, meaning it'll stay visible even when not hovered.
style?Computable<StyleValue>CSS to apply to this feature.
xoffset?Computable<string>The x offset of the tooltip, in px.
yoffset?Computable<string>The y offset of the tooltip, in px.

Defined in

profectus/src/features/tooltips/tooltip.ts:27

Type Aliases

GenericTooltip

Ƭ GenericTooltip: Replace<Tooltip<TooltipOptions>, { direction: ProcessedComputable<Direction> ; pinnable: boolean ; pinned: Ref<boolean> | undefined }>

A type that matches any valid Tooltip object.

Defined in

profectus/src/features/tooltips/tooltip.ts:67


Tooltip

Ƭ Tooltip<T>: Replace<T & BaseTooltip, { classes: GetComputableType<T["classes"]> ; direction: GetComputableTypeWithDefault<T["direction"], Up> ; display: GetComputableType<T["display"]> ; pinnable: undefined extends T["pinnable"] ? false : T["pinnable"] ; pinned: T["pinnable"] extends true ? Ref<boolean> : undefined ; style: GetComputableType<T["style"]> ; xoffset: GetComputableType<T["xoffset"]> ; yoffset: GetComputableType<T["yoffset"]> }>

An object that represents a tooltip that appears when hovering over an element.

Type parameters

NameType
Textends TooltipOptions

Defined in

profectus/src/features/tooltips/tooltip.ts:52

Functions

addTooltip

addTooltip<T>(element, options): Tooltip<T>

Creates a tooltip on the given element with the given options.

Type parameters
NameType
Textends TooltipOptions
Parameters
NameTypeDescription
elementVueFeatureThe renderable feature to display the tooltip on.
optionsT & ThisType<Tooltip<T>> & Partial<BaseTooltip>Tooltip options.
Returns

Tooltip<T>

Defined in

profectus/src/features/tooltips/tooltip.ts:81

Components

Tooltip Component

Props

NameType
elementVueFeature
display*processedPropType<CoercableComponent>(Object, String, Function)
styleprocessedPropType<StyleValue>(Object, String, Array)
classesprocessedPropType<Record<string, boolean>>(Object)
directionprocessedPropType<Direction>(String)
xoffsetprocessedPropType<string>(String)
yoffsetprocessedPropType<string>(String)
pinnedPersistent<boolean>

Slots

Name
default