Hover card
A preview that rests on hover before it opens.
Features
- A preview that rests on hover before it opens.
Use it for
- Links to papers, people, repositories.
Installation
- Get runets.
git clone https://github.com/ziyam-khan/runets - Copy these files into your project, keeping their folders.
- Install what they use.
pnpm add react @base-ui/react motion lucide-react - Load the styles once. Bring your own base tokens, or use runets’ default theme.
import 'runets/styles/theme.css' import 'runets/styles/kit.css'
Usage
import { HoverCard } from 'runets'
<HoverCard href="/research/" trigger="Strategic client silence">…</HoverCard>API
| Prop | Type | What it does |
|---|---|---|
href | string | Where the link goes. |
trigger | ReactNode | Link content. |
Accessibility
- The link works on its own; the card is extra.
Source
The code is in src/kit/overlays.tsx in runets, MIT licensed.