Skip to content
shadcn.io

shadcn.io is not affiliated with official shadcn/ui

Input Group examples · Tooltip

Help Tooltips Input Group for React

An email input with a help button whose tooltip explains how the address is used.

Framework
UI library

Reassure people at the point of entry: a help button at the end of the email field opens a Tooltip that says We'll never share your email.

Preview

Preview width

Installation

Sign in to get your install command
Free with an account. It carries your token, so the CLI installs everything in one go.

FAQ

How is the help button tied to the tooltip?

TooltipTrigger renders the InputGroupButton through render, inside a TooltipProvider.

What is the button called?

Help, from its aria-label. The question-mark icon is aria-hidden.

When does the tooltip open?

On hover and on keyboard focus of the button; Escape closes it.

Does it work on phones?

Not by hover. For privacy notes people must see, put the sentence under the field as a description.

How is the input set up?

type="email" with aria-label="Email address".

Where does the button sit?

In an inline-end InputGroupAddon after the input.