HoverCard

Hover-triggered card that portals to document.body so it's never clipped by an ancestor's overflow. Four sides, configurable enter + exit delays, smooth fade-in.

Hover the avatar — a card portals to the body with a 200ms enter delay.

AR

Usage

import { HoverCard, Avatar } from '@bwo-ui/react';

<HoverCard
  side="bottom"
  trigger={<Avatar fallback="AR" />}
>
  <ProfilePreview user={ana} />
</HoverCard>

Props

PropTypeDefaultDescription
triggerReactElementElement that opens the card on hover/focus.
childrenReactNodeCard content.
side'top' | 'bottom' | 'left' | 'right''bottom'Anchor side.
offsetnumber10Distance from the trigger in px.
openDelaynumber200Hover-in delay in ms.
closeDelaynumber150Hover-out delay in ms.
widthnumber280Fixed card width in px.