Skip to main content
Neural UIv2.1.0Documentation
View v1

Tooltip

Describe a control with a short hint shown on hover or focus.

Category
Overlays
Import
@neural-ui/core/tooltip
Selector
[neuTooltip]
import { NeuTooltipDirective } from '@neural-ui/core/tooltip';

Overview

Add the directive to a named control when a short description helps. Keep the label and any required explanation visible. For interactive content or help users must open on touch, use Popover.

Try it

Focus the copy icon with Tab or hover over it to read the hint. Activate it to copy this pageโ€™s visible URL. The status reports success; if clipboard access is unavailable, select the URL and copy it manually. Escape dismisses the hint.

Try it
Share this documentation

State and events

The directive manages only the hint. The application performs the clipboard write and reports its outcome. A native named button keeps the copy action available by touch, mouse and keyboard. Pass translated plain text to neuTooltip.

Accessibility and keyboard

The hint is associated with the trigger through aria-describedby while visible. The trigger needs an accessible name of its own. Keep links and buttons out of the tooltip.

Key
Action
Tab Focus the trigger and open the hint.
Escape Dismiss the visible hint.

API

Import the directive from its public entry point and attach it to a host element.

Inputs

Configure the component with [property]="value". Your application supplies these values; the component does not replace the state you pass in.

Name
Type
Default
Template binding
Description
neuTooltipstringRequired[neuTooltip]Plain text to display.
neuTooltipDisabledbooleanfalse[neuTooltipDisabled]Suppress opening while true.
neuTooltipPositionNeuTooltipPosition'top'[neuTooltipPosition]Preferred side of the trigger.

Templates

ng-content projects content into the component. TemplateRef inputs receive a template; ng-template directives identify templates with a typed context. A directive shared by an entrypoint is not necessarily a slot of this component.

This component does not expose content projection or public customization templates.

Public methods

Name
Contract
hidehide(): void;
showshow(): void;

Public Types

Open a type to inspect its definition and interface fields.

Styles and tokens

Apply the Neural theme to the application and check the overlay in both color schemes before overriding any public tokens.

Specific tokens

Token
Purpose
State / variant
Default / source
Fallback
--neu-tooltip-bg Inherited theme value used by this component Field surface #0f172aRoot declarationNo token alias
--neu-tooltip-fg Inherited theme value used by this component Field surface #ffffffRoot declarationNo token alias
--neu-tooltip-radius Corner radius Field surface 6pxRoot declarationNo token alias
--neu-tooltip-shadow Surface or overlay elevation Field surface 0 4px 12px rgba(15, 23, 42, 0.24)Root declarationNo token alias

Shared tokens used

Override these on a local wrapper to affect this example. An override on :root affects other components that use the same token.

Token
Purpose here
Other impact
Default / fallback
--neu-font-sans Text typography Shared by other Core consumers; scope the override. 'Inter', system-ui, -apple-system, BlinkMacSystemFont, sans-serif
--neu-space-2 Spacing between content and controls Shared by other Core consumers; scope the override. 0.5rem
--neu-space-3 Spacing between content and controls Shared by other Core consumers; scope the override. 0.75rem
--neu-text-xs Text size Shared by other Core consumers; scope the override. 0.75rem