# Hover card

shadcn's hover card (Radix) in Candor's theme.

- Registry name: `hover-card` (`@candor/hover-card`)
- Tier: Pro. Installing it needs a Pro, Premium or Team licence key: the person runs `npx candor-ui key <key>` themselves; never ask for the key in chat or write it to a file.
- Docs: https://candor.themethodic.com/docs/hover-card

## Install

```bash
npx candor-ui add hover-card
```

Run `npx candor-ui@latest init` once first (https://candor.themethodic.com/get-started.md). Without the CLI: `npx shadcn@latest add @candor/hover-card`.
It brings in: render-prop, utils.
npm packages: radix-ui@^1.8.1.

## Example

```tsx
"use client"

import { HoverCard, HoverCardContent, HoverCardTrigger } from "@/components/ui/hover-card"

export default function Example() {
  return (
    <p className="text-sm">
      The agent changed{" "}
      <HoverCard>
        <HoverCardTrigger asChild>
          <a href="#customers" className="font-mono font-medium underline underline-offset-2">
            customers
          </a>
        </HoverCardTrigger>
        <HoverCardContent>
          <p className="font-mono text-sm font-medium">customers</p>
          <p className="mt-1 text-sm text-muted-foreground">18,240 rows · 14 columns. Read by the billing worker and the admin app.</p>
        </HoverCardContent>
      </HoverCard>{" "}
      on Staging.
    </p>
  )
}
```

## <HoverCard>

No props.

Also takes the props of `React.ComponentProps<typeof HoverCardPrimitive.Root>`.

## <HoverCardTrigger>

No props.

Also takes the props of `React.ComponentProps<typeof HoverCardPrimitive.Trigger>`, `RenderProp`.

## <HoverCardContent>

No props.

Also takes the props of `React.ComponentProps<typeof HoverCardPrimitive.Content>`.

## Rules for using Candor UI

- Components take plain typed data. Never pass model output as HTML or render it as a link; messages are typed blocks.
- A control that can't be used says why: wrap it in `<Locked reason="…">`, don't just disable it.
- Don't show a value you don't have: leave it out (it renders as —) rather than guess. An estimate is labelled as one.
- Nothing is pre-selected in a decision a person makes, and the agent is named from your app's data, never from model output.
- Your app's words go in `LocaleProvider` (fixed strings) and `TermsProvider` (nouns); entity kinds and agent roles in `EntityKindsProvider` and `AgentRolesProvider`.
