Skip to main content
Migrate to Polaris

Version 2025-07 is the last API version to support React-based UI components. Later versions use web components, native UI elements with built-in accessibility, better performance, and consistent styling with Shopify's design system. Check out the migration guide to upgrade your extension.

Tooltip

Tooltips are floating labels that briefly explain the function of a user interface element. They must be specified inside the overlay prop of an activator component. Currently, activator components are Button, Link, and Pressable.

The library automatically applies the WAI-ARIA Tooltip Widget pattern to both the activator and the tooltip content. Expect screen readers to read the tooltip content when the buyer focuses the activator.

Support
Targets (50)

Supported targets


Tooltips are floating labels that briefly explain the function of a user interface element. They must be specified inside the overlay prop of an activator component. Currently, activator components are Button, Link, and Pressable.

The library automatically applies the WAI-ARIA Tooltip Widget pattern to both the activator and the tooltip content. Expect screen readers to read the tooltip content when the user focuses the activator.

string

A unique identifier for the component.


Basic Tooltip

Example

Basic Tooltip

import {
reactExtension,
Icon,
Pressable,
Tooltip,
} from '@shopify/ui-extensions-react/checkout';

export default reactExtension(
'purchase.checkout.block.render',
() => <Extension />,
);

function Extension() {
return (
<Pressable
overlay={
<Tooltip>
In case we need to contact you about
your order
</Tooltip>
}
>
<Icon source="questionFill" />
</Pressable>
);
}
import {
extension,
Icon,
Pressable,
Tooltip,
} from '@shopify/ui-extensions/checkout';

export default extension('purchase.checkout.block.render', (root) => {
const tooltipFragment = root.createFragment();
const tooltip = root.createComponent(
Tooltip,
{},
'In case we need to contact you about your order',
);
tooltipFragment.appendChild(tooltip);
const pressable = root.createComponent(
Pressable,
{overlay: tooltipFragment},
[root.createComponent(Icon, {source: 'questionFill'})],
);

root.appendChild(pressable);
});

Use tooltips if:

  • It’s used for showing information only.

  • The information contained in it isn't needed by the buyer to complete their checkout.

  • The information can be written in a sentence.


Was this page helpful?