Skip to content

Tooltip

Tooltip that shows information on hover.

Basic Usage

Wrap the target element with ATooltip and set the content prop.

vue
<ATooltip content="Top tooltip">
  <ABtn>Top</ABtn>
</ATooltip>
<ATooltip content="Bottom tooltip" placement="bottom">
  <ABtn>Bottom</ABtn>
</ATooltip>
<ATooltip content="Left tooltip" placement="left">
  <ABtn>Left</ABtn>
</ATooltip>
<ATooltip content="Right tooltip" placement="right">
  <ABtn>Right</ABtn>
</ATooltip>

Disabled

Set disabled to disable the tooltip.

vue
<ATooltip content="Won't show" disabled>
  <ABtn>Disabled Tooltip</ABtn>
</ATooltip>

API

Props

NameTypeDefaultDescription
contentstring''Tooltip text
placement'top' | 'bottom' | 'left' | 'right''top'Display position
delaynumber100Show/hide delay (ms)
disabledbooleanfalseDisable tooltip

Events

NameDescription
showTooltip shown
hideTooltip hidden

Slots

NameDescription
defaultTarget element triggering the tooltip

Interaction

  • Delayed show on hover/focus, delayed hide on leave
  • Four directional placement with auto-flip
  • Arrow pointer pointing to trigger element
  • 100ms debounce on enter/leave

MIT License