Tooltip

Preview

Positions
TopRightBottomLeft

Usage

<cs-tooltip content="Helpful information" position="top">
  <cs-button>Hover me</cs-button>
</cs-tooltip>

Properties

class-namestring

Additional CSS class for the tooltip container.

get-track() => null | HTMLElement | SVGElementrequired

Function that returns the element the tooltip points to. Can return null if the element is not yet mounted or available.

positionTooltipProps.Position default: 'top'

Determines where the tooltip is displayed when opened, relative to the trigger. If the tooltip doesn't have enough space to open in this direction, it automatically chooses a better direction based on available space.

Slots

content

Content to display in the tooltip.

Events

escapeCustomEvent<void>

Callback fired when the user presses the Escape key while the tooltip is visible.