# Tooltip

> This page is about FlutterFlow Studio (the visual builder), not FlutterFlow (the app builder you use by describing your app).

URL: https://docs.flutterflow.io/resources/ui/widgets/built-in-widgets/tooltip

Learn how to add text or component tooltips and customize their behavior, position, and appearance in FlutterFlow Studio.

The Tooltip widget displays additional information about its child in a small popup. Use it to explain an icon, describe a control, or provide supporting details without adding permanent text to the page. A tooltip can contain a text message or a custom component.

:::note
Users can hover over the child with a mouse or use the configured tap or long-press interaction on a touch device. Choose an interaction that works with the child's other actions.
:::

![Tooltip showing additional information about a widget](https://docs.flutterflow.io/assets/images/tooltip-5b1d2ec38218cdafa50f67edea29cfd0.png)

## Adding a Tooltip Widget

To add a text tooltip to your app:

1. Right-click the widget that needs a tooltip and select **Wrap Widget > Tooltip**.
2. Select **Tooltip** and open the properties panel.
3. Set **Tooltip Type** to **Text**, then enter the message under **Message > Text**. To use a custom layout instead, follow [Using a Component](#using-a-component).

<div style={{
    position: 'relative',
    paddingBottom: 'calc(56.67989417989418% + 41px)', // Keeps the aspect ratio and additional padding
    height: 0,
    width: '100%'
}}>
    <iframe 
        src="https://demo.arcade.software/MfxRuIw5rVM2M9QLkL5V?embed&show_copy_link=true"
        title="Adding a Tooltip Widget"
        style={{
            position: 'absolute',
            top: 0,
            left: 0,
            width: '100%',
            height: '100%',
            colorScheme: 'light'
        }}
        frameborder="0"
        loading="lazy"
        webkitAllowFullScreen
        mozAllowFullScreen
        allowFullScreen
        allow="clipboard-write">
    </iframe>
</div>

## Customizing

Select the Tooltip widget and open the properties panel to customize its content, behavior, position, and appearance.

### Tooltip Content

Use a text message for a short explanation or a component for a custom layout.

#### Text and Text Styling

Set **Tooltip Type** to **Text** and expand **Message** to configure the message and its appearance:

- **Text**: Enter the tooltip message, such as `Add Card`.
- **Theme Text Style**: Choose a text style from your app's theme.
- **Font Family**: Choose the font family for the message.
- **Font Weight**: Choose the text weight, such as **400 - Normal**.
- **Styling**: Apply italic, underline, or strikethrough formatting.
- **Font Size** and **Text Color**: Adjust the text size and color.
- **Line Height**: Adjust the spacing between lines of text.
- **Letter Spacing**: Adjust the spacing between characters.

Use **Text Overflow Replacement** to control how text appears when it doesn't fit in the available space. Leave it as **Unspecified** to use the default overflow behavior.

#### Using a Component

Use a component to display images, icons, or a custom layout in a tooltip. For example, a shopping app can show a breakdown of customer reviews when users hover over a product rating.

Set **Tooltip Type** to **Component** and select the component to display.

<div style={{
    position: 'relative',
    paddingBottom: 'calc(56.67989417989418% + 41px)', // Keeps the aspect ratio and additional padding
    height: 0,
    width: '100%'}}>
    <iframe 
        src="https://demo.arcade.software/jnFUZZQ9pmCH5vgvhVVA?embed&show_copy_link=true"
        title="Using a Component as Tooltip Content"
        style={{
            position: 'absolute',
            top: 0,
            left: 0,
            width: '100%',
            height: '100%',
            colorScheme: 'light'
        }}
        frameborder="0"
        loading="lazy"
        webkitAllowFullScreen
        mozAllowFullScreen
        allowFullScreen
        allow="clipboard-write">
    </iframe>
</div>
<p></p>

#### Passing a Custom Widget Layout

When you want to reuse a tooltip component with different widget layouts, use a [Widget Builder parameter](https://docs.flutterflow.io/resources/ui/components/widget-builder). Use this approach to pass a widget layout into the tooltip component.

1. Create a wrapper component and add a parameter of type **Widget Builder**.
2. Place the widget builder in the wrapper's widget tree where the custom content belongs.
3. In the Tooltip widget, set **Tooltip Type** to **Component** and select the wrapper.
4. Supply the content through the wrapper's widget builder parameter.

<div style={{
    position: 'relative',
    paddingBottom: 'calc(56.67989417989418% + 41px)', // Keeps the aspect ratio and additional padding
    height: 0,
    width: '100%'}}>
    <iframe 
        src="https://demo.arcade.software/vFDY8DNskFzGWKFFmlM4?embed&show_copy_link=true"
        title="Passing a Custom Widget Layout to a Tooltip"
        style={{
            position: 'absolute',
            top: 0,
            left: 0,
            width: '100%',
            height: '100%',
            colorScheme: 'light'
        }}
        frameborder="0"
        loading="lazy"
        webkitAllowFullScreen
        mozAllowFullScreen
        allowFullScreen
        allow="clipboard-write">
    </iframe>
</div>
<p></p>

### Interaction

#### Trigger Mode

Use **Trigger Mode** to choose whether a tap or a long press opens the tooltip on touch devices. Test the selected interaction with the child widget's other actions.

#### Show Tooltip on Focus

Enable **Show Tooltip on Focus** to display the tooltip when its child receives keyboard focus. Test it with a child that supports keyboard focus, such as an interactive control.

![Tooltip displayed when its target receives keyboard focus](https://docs.flutterflow.io/assets/images/tooltip-on-focus-453f0549603cce29b11c5d80026cb03a.avif)

### Positioning

#### Preferred Direction

Set **Preferred Direction** to **Above**, **Below**, **Left**, or **Right** to choose where the tooltip appears relative to its target widget.

#### Tail Size

The tail is the pointer that connects the tooltip to its target. **Tail Width** sets the width of its base, and **Tail Length** sets how far it extends toward the target.

#### Offset

Set **Offset** to adjust the gap between the tooltip and its target widget.

![Offset setting controlling the gap between a tooltip and its target](https://docs.flutterflow.io/assets/images/tooltip-offset-47f6819961c5e20b5fa445ec2c8a92d7.png)

### Appearance

#### Background Color

Set **Background Color** to change the tooltip's background.

![Tooltip with a customized background color](https://docs.flutterflow.io/assets/images/tooltip-bckgrnd-261d7c5f3471b2a857bdac182486ff17.png)

#### Border Radius

Set **Border Radius** to adjust how rounded the tooltip's corners appear.

![Tooltip with rounded corners](https://docs.flutterflow.io/assets/images/radius-2a4208b0c9e93313f75fc32f37423061.png)

#### Elevation

Set **Elevation** to adjust the tooltip's shadow and apparent depth.

![Tooltip with an elevation shadow](https://docs.flutterflow.io/assets/images/elevate-tooltip-5d0debf060f2db74d57851f8061f4b6d.png)

#### Internal Padding

Set **Padding** to adjust the space between the tooltip's content and its edges. Use the mode control to set one value for all sides or configure each side separately. To apply the same padding to every side, use the slider or enter a value.

![Padding around the tooltip content](https://docs.flutterflow.io/assets/images/internal-padding-ef3f97ed1d1ce89d91aa73e095a7ba16.png)

#### Shadows

Use **Shadows** to configure individual shadows. Click **Add Shadow**, then expand the shadow entry to adjust these properties:

- **Color**: Set the shadow color.
- **Blur Radius**: Adjust how soft or sharp the shadow appears.
- **Offset X**: Shift the shadow horizontally.
- **Offset Y**: Shift the shadow vertically.

To delete a shadow, click **Remove** on its entry. Use **Add Shadow** again to add another shadow.

### Timing

#### Wait Duration

Set **Wait Duration (ms)** to adjust the delay before the tooltip appears. For example, `100` means 100 milliseconds. Test the delay with your chosen trigger mode.

#### Show Duration

Use **Show Duration (ms)** to adjust how long the tooltip remains visible after it is triggered. For example, `1500` means 1.5 seconds. Test dismissal with hover, tap, or long press as appropriate for your app.
