A Base UI (Angular) tooltip is an attribute on any host: base-tooltip plus the hint text. It hides on leave, blur, Escape, or scroll. Use tooltipPlacement, not placement, so it does not collide with dropdown or popover on the same element. Copy-in source, no npm UI package.
Install with npx base-ui-cli add tooltip.
Default Tooltip example below.
Control tooltip position with tooltipPlacement="" (not bare placement — that collides with dropdown/popover). Supported positions: "left", "right", "top", and "bottom". Tooltips dismiss on scroll so they do not float away from the host.
By default Base Tooltip is dark, but we support light version, as well. Use type="light" to switch to light version.
Run the following command to add this component to your project:
npx base-ui-cli add tooltip
For AI agents
Copy a prompt with the registry name, CLI install, and import — or add the Base UI MCP server.
npx -y base-ui-mcp
Base UI provides standalone components. Import the exact elements you want to use into your component.
// Install: npx base-ui-cli add tooltip
// Paths are relative to aliases.components (default: src/app/components)
import { TooltipDirective } from './tooltip/tooltip.directive';
@Component({
selector: 'app-your-component',
imports: [
TooltipDirective
],
template: `...`
})
export class YourComponent {} API for tooltip — generated from JSDoc in the library source.
| API | Member | Type | Default | Description |
|---|---|---|---|---|
[base-tooltip] | base-tooltip | string | '' | The text content to display inside the tooltip. |
[base-tooltip] | tooltipPlacement | TooltipPlacement | string | 'top' | The positioning of the tooltip relative to the host element. Defaults to 'top'. Use the `tooltipPlacement` template attribute — not bare `placement`, which collides with dropdown, popover, and drawer placement on the same host. |
[base-tooltip] | tooltipClass | string | '' | Additional custom CSS classes to apply to the tooltip element. |
[base-tooltip] | delay | unknown | '0' | Milliseconds to delay before showing the tooltip. Defaults to '0'. |
[base-tooltip] | type | 'dark' | 'light' | string | 'dark' | The visual theme variant. Defaults to 'dark'. |
[base-tooltip] | canShow | boolean | true | Whether the tooltip is permitted to show at all. Defaults to true. |
Content