Components
Hover Card
A preview card for a link, shown on hover and keyboard focus.
Ombelle · light
Hover Card
Built with @ombelle presets.
Installation
Run in a project initialized with an Ombelle preset (see Get started). The component uses the saved project preset. Run the command from your app folder; it shows the changes and asks before writing.
pnpm dlx @ombelle-ui/cli@1.1.2 add hover-cardAdds components/ui/hover-card.tsx and installs react, @radix-ui/react-hover-card, clsx, tailwind-merge with lifecycle scripts disabled. This is a client component.
In a liquid glass project the plan adds a notice that accessibility is not guaranteed, because text contrast depends on the background behind the glass.
Usage
example.tsx
import { HoverCard, HoverCardTrigger, HoverCardContent, HoverCardArrow } from '@/components/ui/hover-card'
export function Example(){return <p>Built with <HoverCard><HoverCardTrigger href="https://github.com/ombelle">@ombelle</HoverCardTrigger><HoverCardContent><strong>Ombelle UI</strong><p>Reviewed React components with deterministic presets.</p><HoverCardArrow /></HoverCardContent></HoverCard> presets.</p>}API and states
- API
- HoverCard (open, onOpenChange, openDelay, closeDelay), HoverCardTrigger (href), HoverCardContent (side, align), HoverCardArrow
- Minimum states
- Closed, open on hover, open on focus
- Native basis
- Radix Hover Card; Base UI Preview Card in the Base UI edition
- Styles
- Stable in Ombelle, Papier, Organic, Retro futurism, minimalist, neo-brutalism and flat, light and dark. Liquid glass: stable, accessibility not guaranteed.