bmates-uiBMates UI
Latest
/Components

HoverCard

A non-modal preview displayed when a target is hovered.

A non-modal preview displayed when a target is hovered.

Import

import { HoverCard, HoverCardToggle, HoverCardContent } from 'bmates-ui';

Basic usage

The example below mirrors the primary Storybook composition and can be used as a starting point.

<HoverCard>
  <HoverCardToggle>@bmates</HoverCardToggle>
  <HoverCardContent>
    <strong>BMates UI</strong>
    <p>A React component library.</p>
  </HoverCardContent>
</HoverCard>

Preview

HoverCard

Prop previews

The examples below isolate the props that change visual output or interaction.

Alignment

Alignment

Open delay

Open delay

Trigger spacing

Trigger spacing

Component API

HoverCard

Root hover-card context.

HoverCardContent.width

Preview surface width.

HoverCardToggle

Target that opens the preview while hovered.

align

Content alignment.

space

Gap between trigger and content in pixels.

openDelay

Delay before opening in milliseconds.

closeDelay

Delay before closing in milliseconds.

Usage notes

  • Every component in the table is exported from bmates-ui.
  • Unless noted otherwise, a component also accepts the standard props of its underlying HTML element.
  • For application-owned state, use a controlled value and its change handler instead of only a default* prop.