Primitives

Hover card

A preview of a person or a vehicle on hover or focus. default, glass, dark; arrow.

Approved by @karim at Gate 2 for DHA-GA 12-3456. Hover or focus the links.

Import#

Everything comes from the package root. The example above uses:

your-component.tsx
import { Avatar, Badge, HoverCard, HoverCardContent, HoverCardTrigger } from "@waveinno/ui";

Props#

Read from the source of this version, so they match the code exactly.

<HoverCard>

src/components/ui/hover-card.tsx

Also takes ComponentProps<typeof HoverCardPrimitive.Root> (passed through).

<HoverCardContent>

src/components/ui/hover-card.tsx
PropTypeDefaultDescription
variant"default" | "glass" | "dark""default"
arrowbooleanfalse

Also takes ComponentPropsWithoutRef<typeof HoverCardPrimitive.Content>.

<Avatar>

src/components/ui/avatar.tsx
PropTypeDefaultDescription
namerequiredstring—
srcstring | null—
sizekeyof typeof sizes"md"
statuskeyof typeof STATUS—
verifiedboolean—
ring"gradient"—
shape"circle" | "square""circle"
classNamestring—

<Badge>

src/components/ui/badge.tsx
PropTypeDefaultDescription
dotbooleantrue
variant"soft" | "solid" | "outline" | "dot" | "gradient" | "live""soft"

Also takes HTMLAttributes<HTMLSpanElement> & VariantProps<typeof badgeVariants>.

Install#

If the project does not have the package yet, add it, then follow the setup for Next.js or Vite once.

$ npm install @waveinno/ui