🚀 saastro/ui (Astro)
⚛️ shadcn/ui (React)
Installation
npx saastro add hover-card
Usage
---
import { HoverCard, HoverCardTrigger, HoverCardContent } from "@/components/ui-saastro/hover-card";
---
<HoverCard>
<HoverCardTrigger>
<span>Hover over me</span>
</HoverCardTrigger>
<HoverCardContent>
Content shown on hover
</HoverCardContent>
</HoverCard>
Props
HoverCard
| Prop | Type | Default | Description |
|---|---|---|---|
| openDelay | number | 200 | Delay before showing (ms) |
| closeDelay | number | 300 | Delay before hiding (ms) |
HoverCardContent
| Prop | Type | Default | Description |
|---|---|---|---|
| side | "top" | "bottom" | "left" | "right" | "bottom" | Preferred side |
| align | "start" | "center" | "end" | "center" | Alignment |
Accessibility
- Shows on hover and focus for keyboard users
- Uses configurable delays to prevent flickering
- Content remains visible when hovering over it
Performance
Performance Benchmark
Bundle Size
~2KB vs ~185KB
99% menos
Hydration
0ms vs --
Sin hydration
Hover Response
-- vs --
Interactúa para medir
Saastro (Vanilla JS)
shadcn (React)
Haz click en "Ejecutar Test" o interactúa con los componentes (hover) para medir el rendimiento.