File

packages/eui/packages/components/directives/eui-tooltip/eui-tooltip.directive.ts

Description

A tooltip is a text box that displays addition information when a user hovers over, clicks or gives focus to a UI element such as an icon, a highlighted word or a button.

The information should be contextual, useful and non-essential.

Implements

OnChanges OnInit OnDestroy

Metadata

Index

Methods
Inputs
HostListeners
Accessors

Inputs

contentAlignment
Type : "left" | "right" | "center" | "justify"
Default value : 'center'

Sets the alignment of the content in the tooltip.

e2eAttr
Type : string
Default value : 'eui-tooltip'

Sets the data-e2e attribute for the host element.

euiTooltip
Type : string

Tooltip content.

euiTooltipAccent
Type : boolean
Default value : false

Whether the tooltip has Accent state.

euiTooltipDanger
Type : boolean
Default value : false

Whether the tooltip has a Danger state.

euiTooltipInfo
Type : boolean
Default value : false

Whether the tooltip has Info state.

euiTooltipPrimary
Type : boolean
Default value : false

Whether the tooltip has a Primary state.

euiTooltipSecondary
Type : boolean
Default value : false

Whether the tooltip has a Secondary state.

euiTooltipSuccess
Type : boolean
Default value : false

Whether the tooltip has a Success state.

euiTooltipWarning
Type : boolean
Default value : false

Whether the tooltip has a Warning state.

hideDelay
Type : number
Default value : 0

Sets the delay for the tooltip to be hidden

isDisabled
Type : boolean
Default value : false

Whether the tooltip is disabled.

position
Type : "left" | "right" | "above" | "below" | "before" | "after" | string
Default value : 'above'

Sets the position of the tooltip relative to its trigger element.

showDelay
Type : number
Default value : 0

Sets the delay for the tooltip to be visible.

HostListeners

focus
Arguments : '$event'
mouseenter
Arguments : '$event'

Methods

focused
focused(event: FocusEvent)
Decorators :
@HostListener('focus', ['$event'])
Parameters :
Name Type Optional
event FocusEvent No
Returns : void
Public hide
hide()

Method that closes a tooltip.

Returns : void
mouseEntering
mouseEntering(event: MouseEvent)
Decorators :
@HostListener('mouseenter', ['$event'])
Parameters :
Name Type Optional
event MouseEvent No
Returns : void
Public show
show(origin: EventTarget)

Method that shows a tooltip.

Parameters :
Name Type Optional Default value Description
origin EventTarget No this.host.nativeElement

Origin of the tooltip. Where it will be displayed.

Returns : void

Accessors

isOpen
getisOpen()

Returns the current open state.

Returns : boolean

results matching ""

    No results matching ""