---
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: aria
component: true
links:
doc: https://react-aria.adobe.com/Tooltip
api: https://react-aria.adobe.com/Tooltip#api
---
## Installation
CommandManual
```bash
npx shadcn@latest add tooltip
```
Install the following dependencies:
```bash
npm install react-aria-components
```
Copy and paste the following code into your project.Update the import paths to match your project setup.
## Usage
```tsx showLineNumbers
import { Tooltip, TooltipTrigger } from "@/components/ui/tooltip"
```
```tsx showLineNumbers
Add to library
```
## Composition
Use the following composition to build a `Tooltip`:
```text
TooltipTrigger
├── Button
└── Tooltip
```
## Placement
Use the `placement` 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.
## RTL
To enable RTL support in shadcn/ui, see the [RTL configuration guide](/docs/rtl).
## API Reference
See the [React Aria Tooltip](https://react-aria.adobe.com/Tooltip#api) documentation.