Skip to main content

Tooltip API Overview

Initialization

<script>
import { Tooltip } from "@svar-ui/svelte-core";
</script>

<Tooltip at="top-center" arrow>
<div data-tooltip-text="Hello">Hover me</div>
</Tooltip>
tip
  • Visit the Features Guide to learn more about the component's functionality.
  • Explore the samples to visualize the available features.

Tooltip Properties

arrowOptional. Defines whether a directional arrow is shown on the tooltip
atOptional. Defines the tooltip placement relative to the hovered element
contentOptional. A Svelte component to render as the tooltip body
cssAdds a custom CSS class to the Tooltip
delayOptional. Sets the delay in milliseconds before the tooltip is shown after hovering
overflowOptional. Controls whether the tooltip is shown only when the anchor element's text is not fully visible
resolverOptional. A function called on every hovered element that returns the tooltip content
touchOptional. Defines whether tooltips are enabled on touch devices