Hovercard

Contextual preview revealed from a hover or focus target.

The hovercard will appear upon the mouse entering the anchor, with a delay of 300 milliseconds. It will remain open as long as the mouse cursor is over either the open card or the anchor.

Usage

  • Hovercard is a progressive enhancement. It surfaces supplementary information about an entity or provides convenience shortcuts on hover, without navigating away from the current view. Its content or functionality must also be reachable by another route (a dedicated page, a menu, or an inline button).
  • Keep content concise. Hovercards are transient overlays, and are not appropriate for deep interactions, multi-step flows, or extensive content.
  • Use Hovercard for contextual content with structure or actions. Use Tooltip for brief, text-only descriptions of a control. Use Popover when the content is triggered by a deliberate click and should persist until dismissed.
  • enterDelay is used to prevent the card from triggering on accidental cursor passes. The default delay of 300 ms is recommended for most contexts.

Do

  • Surface contextual details like a user's status, avatar, and quick-action shortcuts.
  • Treat hovercard actions as shortcuts — ensure the same actions are reachable elsewhere in the UI.

Don’t

  • Use Hovercard as the only way to reach content or perform an action.
  • Place critical or destructive actions exclusively inside a hovercard.
  • Use for deep interactions or lengthy content — prefer a dedicated UI or a Modal.

Accessibility

When focus moves into an open hovercard, focus is trapped within. The user can Tab between focusable elements inside the card without accidentally leaving. Clicking outside the hovercard or keypress of esc will dismiss the card and restore focus to the element that had focus before the card opened.

Many Hovercards

After opening one hovercard, quickly moving to another skips the entrance delay. This is a "warm-up" pattern for faster navigation between targets.

Examples

Content Mode

Hovercard content renders outside the DOM tree. Use the contentMode prop to apply color mode (invert, light, dark) to the positioned content. See Positioned Components for details.

Vue API

import { DtHovercard } from '@dialpad/dialtone-vue';

Slots

Name
Type
anchor

Anchor element that activates the hovercard. Usually a button.

content

Slot for the content that is displayed in the hovercard.

footerContent

Slot for the footer content.

headerContent

Slot for hovercard header content

Props

Name
Default
Type
anchorClass
''
string|array|object

Additional class name for the anchor wrapper element.

appendTo
'body'
"'body'" | "'parent'" | "'root'" | "HTMLElement" | ""

Sets the element to which the popover is going to append to. 'body' will append to the nearest body (supports shadow DOM).

contentClass
''
string|array|object

Additional class name for the content wrapper element.

contentMode
"light" | "dark" | "invert"

Applies a color mode to the positioned content element.

dialogClass
''
string|array|object

Additional class name for the dialog element.

enterDelay
TOOLTIP_DELAY_MS
number

The enter delay in milliseconds before the hovercard is shown.

externalAnchorElement
null
HTML_ELEMENT_TYPE

External anchor element reference. Use this instead of the anchor slot when the anchor may be inside a Shadow DOM, as querySelector cannot pierce shadow boundaries.

fallbackPlacements
['auto']
array

If the popover does not fit in the direction described by "placement", it will attempt to change its direction to the "fallbackPlacements".

footerClass
''
string|array|object

Additional class name for the footer content wrapper element.

headerClass
''
string|array|object

Additional class name for the header content wrapper element.

id
generated unique ID
string

The id of the tooltip

leaveDelay
TOOLTIP_DELAY_MS
number

The leave delay in milliseconds before the hovercard is hidden.

offset
[0, 16]
array

Displaces the content box from its anchor element by the specified number of pixels.

open
null
"null" | "true" | "false"

Controls whether the hovercard is shown. Leaving this null will have the hovercard trigger on hover by default. If you set this value, the default trigger behavior will be disabled, and you can control it as you need. Supports .sync modifier

padding
'large'
"none" | "small" | "medium" | "large"

Padding size class for the popover content.

placement
'top-start'
"top" | "top-start" | "top-end" | "right" | "right-start" | "right-end" | "left" | "left-start" | "left-end" | "bottom" | "bottom-start" | "bottom-end"

The direction the popover displays relative to the anchor.

transition
false
"true" | "false"

Fade transition when the content display is toggled.

Events

Name
Type
opened
Boolean | Array

Emitted when hovercard is shown or hidden

Hovercard documentation last updated Friday, September 4, 2026

fix/popover-modal-zindex-scope