Tooltip

Provide a short supporting description of an element.

Live preview
Interact with the component to see results here.
View code
HTML
<div style="display:inline-flex;align-self:center;margin:70px 0">
  <sy-button>Help<sy-tooltip
      content="Save the changes."
      position="top"
      trigger="hover"
      maxwidth="220"
      opendelay="0"
      id="sample"
    ></sy-tooltip>
  </sy-button>
</div>

Usage guide

#

Use for short supplementary descriptions, such as explanations of icons or abbreviated names.

Read-only explanations

Place Tooltip inside the target and put a short description in content. Show it through hover, click, focus, or open.

Clickable or editable content

Use Popover when the content needs interaction.

Feature examples

#

Choose a feature from 12 topics. Explore property settings, method calls, event results, and slot layouts through live examples and code.

Usage examples · Overview

Try the selected example. Topics with multiple configurations let you switch between detailed examples.

View code
HTML
Loading the example.

Property · Animation

See how settings change appearance and behavior.

View code
HTML
Loading the example.

Property · AnimationSpeed

See how settings change appearance and behavior.

View code
HTML
Loading the example.

Property · Closedelay

See how settings change appearance and behavior.

View code
HTML
Loading the example.

Property · Content

See how settings change appearance and behavior.

View code
HTML
Loading the example.

Property · Hide Arrow

See how settings change appearance and behavior.

View code
HTML
Loading the example.

Property · Max Width

See how settings change appearance and behavior.

View code
HTML
Loading the example.

Property · Open

See how settings change appearance and behavior.

View code
HTML
Loading the example.

Property · Opendelay

See how settings change appearance and behavior.

View code
HTML
Loading the example.

Property · Position

See how settings change appearance and behavior.

View code
HTML
Loading the example.

Property · Trigger

See how settings change appearance and behavior.

View code
HTML
Loading the example.

Methods · Close

Use the example's buttons to call methods and inspect their results.

View code
HTML
Loading the example.

API reference

#

Hover over a name or focus it with the keyboard to see the code. On touch screens, tap the name.

<sy-tooltip>

Properties

Attribute / PropertyTypeDefaultDescription
booleanfalseControls whether the tooltip arrow is hidden
booleanfalseShow the description independently of automatic triggers.
number0Delay in milliseconds before closing the tooltip after trigger event ends
number | nullnullMaximum width of the tooltip in pixels
number0Delay in milliseconds before opening the tooltip after trigger event starts
string''Short helper description.
'top' | 'topLeft' | 'topRight' | 'right' | 'rightTop' | 'rightBottom' | 'bottom' | 'bottomLeft' | 'bottomRight' | 'left' | 'leftTop' | 'leftBottom''top'Placement relative to the element being described.
'hover' | 'click' | 'focus' | 'none''hover'User action that opens the list or popup.
| 'none' | 'fade' | 'fade-scale' | 'zoom' | 'pop' | 'slide-top' | 'slide-bottom' | 'slide-left' | 'slide-right' | 'slide-fade-top' | 'slide-fade-bottom' | 'slide-fade-left' | 'slide-fade-right' | 'reveal-top' | 'reveal-bottom' | 'reveal-left' | 'reveal-right' | 'flip-x' | 'flip-y' | 'bounce' | 'spin''none'Enter/exit animation type. `none` (default) toggles instantly. The host itself is the popup, so the animation runs on the host element directly (including the dynamically-attached arrow). `slide-*` and `reveal-*` use explicit directions because the tooltip's `position` attribute drives anchor placement, not animation direction.
'x-fast' | 'fast' | 'medium' | 'slow' | 'x-slow''fast'Animation playback speed token. Maps to `--transition-*` global tokens.

Methods

MethodReturnsDescription
Promise<void>Close the open panel.