# One open

Keeps one hover card open at a time. Sweep across a row of badges and the card follows the pointer instead of stacking. Used by price-position and price-trend; use it for your own hover cards.

Docs: https://ui.twelfth.ai/one-open · Category: Foundations · Updated: 2026-10-30

## Install

```bash
npx shadcn@latest add https://ui.twelfth.ai/r/one-open.json
```

```tsx
import { useOneOpen } from "@/lib/one-open"
```

## A row of hover cards

Move quickly from one to the next.

```tsx
const [open, setOpen] = useOneOpen()

<Popover open={open} onOpenChange={setOpen}>
  <PopoverTrigger openOnHover>…</PopoverTrigger>
  <PopoverContent>…</PopoverContent>
</Popover>
```

## useOneOpen() props

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `returns` | `[open: boolean, onOpenChange: (open) => void]` |  | Pass straight to a controlled Popover or Tooltip. |

---

twelfth UI: Open-source (MIT) shadcn components for category managers and retail buying teams, by twelfth (https://twelfth.ai). React and TypeScript on shadcn's Base UI styles and Tailwind CSS v4. Components take plain props and fetch no data. Every block: https://ui.twelfth.ai/llms.txt
