---
title: Tooltip
description: A popup that displays information related to an element when the element receives keyboard focus or the mouse hovers over it.
base: base
component: true
links:
doc: https://base-ui.com/react/components/tooltip
api: https://base-ui.com/react/components/tooltip#api-reference
---
## Installation
Command
Manual
```bash
npx shadcn@latest add tooltip
```
Install the following dependencies:
```bash
npm install @base-ui-components/react
```
Copy and paste the following code into your project.
Update the import paths to match your project setup.
## Usage
```tsx showLineNumbers
import {
Tooltip,
TooltipContent,
TooltipTrigger,
} from "@/components/ui/tooltip"
```
```tsx showLineNumbers
Hover
Add to library
```
## Examples
### Side
Use the `side` prop to change the position of the tooltip.
### With Keyboard Shortcut
### Disabled Button
Show a tooltip on a disabled button by wrapping it with a span.
## API Reference
See the [Base UI Tooltip](https://base-ui.com/react/components/tooltip#api-reference) documentation.