shadcn.io is an independent project built on shadcn/ui
The label API Endpoint sits next to a code icon. The card is titled Endpoint Details and shows Method GET, URL /api/v1/users, and Auth Bearer Token Required.
Put it on an API screen when those three fields are useful but not always needed. A Tooltip is too small for three fields. In React, Ark UI does not call the endpoint.
Installation
Anatomy

Usage
<div className="flex items-center gap-2">
<span className="text-sm">API Endpoint</span>
<HoverCard>
<HoverCardTrigger asChild>
<button
aria-label="Endpoint details"
className="text-muted-foreground"
type="button"
>
<CodeIcon aria-hidden="true" className="size-4" />
</button>
</HoverCardTrigger>
<HoverCardContent className="w-80">
<div className="flex flex-col gap-3">
<h4 className="font-semibold text-sm">Endpoint Details</h4>
<div className="flex flex-col gap-2 text-sm">
<div>
<span className="text-muted-foreground">Method:</span>{" "}
<code className="rounded bg-muted px-1.5 py-0.5 text-xs">
GET
</code>
</div>
<div>
<span className="text-muted-foreground">URL:</span>{" "}
<code className="rounded bg-muted px-1.5 py-0.5 text-xs">
/api/v1/users
</code>
</div>
<div>
<span className="text-muted-foreground">Auth:</span>{" "}
<span className="text-xs">Bearer Token Required</span>
{/* The rest of the file is under Installation. */}FAQ
What is in the card?
The title Endpoint Details and three lines: Method GET and URL /api/v1/users in small code chips on bg-muted, and Auth: Bearer Token Required.
How is the code icon made the trigger?
HoverCardTrigger takes asChild, and the demo passes the code icon, a button.
How is the icon button named?
The CodeIcon is hidden from assistive tech, so the button carries aria-label="Endpoint details".
How do I change how fast the card opens and closes?
The card opens a moment after the pointer rests on the trigger and stays up long enough for the pointer to move into it. Both delays are in milliseconds.
Set openDelay and closeDelay on HoverCard; they default to 10 and 100. positioning picks another side than the bottom.
Does the card open from the keyboard and on touch screens?
Focusing the icon button opens the card, moving focus away or pressing Escape closes it. The icon button carries an aria-label, so it is announced by name. Touch screens have no hover, so keep what matters reachable elsewhere, or use a Popover when the card has to open on a tap.
API Reference
Hover Card
Sets asChild. The rest is on the Hover Card page.




