---
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
CommandManualRun the following command:
```bash
npx shadcn@latest add @rescript-shadcn/Tooltip
```
Add the `Tooltip.Provider` to the root of your app.
```res title="app/layout.res" showLineNumbers {1,7}
module RootLayout = {
@react.component
let make = (~children) =>
{children}
}
```
Install the following dependencies:
```bash
npm install @base-ui/react @rescript-shadcn/base-ui
```
Copy and paste the following code into your project.Add the `Tooltip.Provider` to the root of your app.
```res title="app/layout.res" showLineNumbers {1,7}
module RootLayout = {
@react.component
let make = (~children) => {
{children}
}
}
```
## Usage
```res showLineNumbers
}>
{"Hover"->React.string}
{"Add to library"->React.string}
```
## 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.