# V tooltip 4

> Placement

A shadcn/ui block from the [@cnippet](https://ui.cnippet.dev/) registry, listed on [shadcn.exchange](https://shadcn.exchange/r/cnippet/v-tooltip-4).

- Page, with a live preview: https://shadcn.exchange/r/cnippet/v-tooltip-4
- Screenshot: https://abzjhwgwpdpz7ua5.public.blob.vercel-storage.com/shots/cnippet/v-tooltip-4-light-814e36495f5bdc81.png
- Registry item: https://ui.cnippet.dev/r/v-tooltip-4.json
- Categories: tooltip
- Listed: 2026-10-13, source last changed 2026-10-13

## Install

```bash
npx shadcn@latest add https://ui.cnippet.dev/r/v-tooltip-4.json
```

Run it in a project that has shadcn/ui set up. It adds the files below and installs what they depend on.

## Dependencies

- Registry items: `@cnippet/tooltip`

## Files

### `registry/default/variants/v-tooltip-4.tsx`

```tsx
import { Button } from "@/registry/default/ui/button";
import {
  Tooltip,
  TooltipContent,
  TooltipTrigger,
} from "@/registry/default/ui/tooltip";

const sides = [
  "inline-start",
  "left",
  "top",
  "bottom",
  "right",
  "inline-end",
] as const;

export function Pattern() {
  return (
    <div className="grid max-w-xs grid-cols-3 gap-2">
      {sides.map((side) => (
        <Tooltip key={side}>
          <TooltipTrigger
            render={<Button className="w-full" variant="outline" />}
          >
            {side.replace("-", " ")[0]?.toUpperCase() +
              side.replace("-", " ").slice(1)}
          </TooltipTrigger>
          <TooltipContent side={side}>
            <p className="text-sm">Add to library</p>
          </TooltipContent>
        </Tooltip>
      ))}
    </div>
  );
}
```
