UI Components
Hover Card
A rich preview card that appears on hover with configurable delay, side placement, and portal rendering.
Quick Preview
Installation
// Copy HoverCard.tsx to your components/ui/ folder// src/components/ui/HoverCard.tsx
Usage
import { HoverCard, HoverCardContent } from '@/components/ui/HoverCard'<HoverCardtrigger={<button>Hover me</button>}side="bottom"openDelay={300}closeDelay={150}><HoverCardContent><p>Rich preview content here</p></HoverCardContent></HoverCard>
Prompt Preview
Copy a prompt that recreates this UI
Paste this into your AI coding assistant to generate code that closely matches the reference, including color, size, shape, typography, spacing, and polish.
Copy-ready AI prompt
Starts from the current visual reference and project constraints.
Tweak only product-specific copy or data after the first generation pass.
Props
| Prop | Type | Default | Description |
|---|---|---|---|
trigger* | React.ReactNode | - | Element that activates the hover card |
children* | React.ReactNode | - | Card content (use HoverCardContent) |
side | 'top' | 'bottom' | 'left' | 'right' | 'bottom' | Side to display the card |
sideOffset | number | 8 | Distance in pixels from the trigger |
openDelay | number | 300 | Milliseconds before card opens |
closeDelay | number | 150 | Milliseconds before card closes |