Skip to content
Browse library
BIU UI/Components/Hover Card
COMPONENTS

Hover Card

Explore the Hover Card component and try its interactive examples.

INTERACTIVE PREVIEW

Preview

Install the components for this example with pnpm dlx shadcn add @biudev/hover-card @biudev/avatar.

Loading preview…
GET STARTED

Installation

Install the component source via shadcn Registry, the BIU CLI, or as an npm package.

TERMINAL / pnpm
pnpm dlx shadcn add @biudev/hover-card

First time using @biudev? Map "@biudev": "https://ui.biu.dev/r/0.1.0/{name}.json" under registries in your components.json (see setup).

Usage

Start with this example, then adjust the import path for your project.

EXAMPLE / TSX
"use client";
import { HoverCard } from "@/components/ui/biu/hover-card";

export function Example() {
  return (
    <HoverCard
      width={260}
      content={
        <div style={{ display: "grid", gap: 4 }}>
          <strong>Scout</strong>
          <span style={{ fontSize: 12, opacity: 0.65 }}>Research agent · 41 runs this week</span>
        </div>
      }
    >
      <a href="#scout" style={{ textDecoration: "underline", textUnderlineOffset: 3 }}>
        Scout
      </a>
    </HoverCard>
  );
}

Examples

Try each example or switch to its code.

API reference

Properties and defaults from the component source. An asterisk marks a required property; a dash means no explicit default.

HoverCardSide

Also accepts properties from 'bottom' & 'top' & 'right' & 'left'.

Some properties depend on the variant; consult the source for the full union.

HoverCardAlign

Also accepts properties from 'start' & 'center' & 'end'.

Some properties depend on the variant; consult the source for the full union.

HoverCardProps

Source

Review a formatted version of the component source used by the Registry.