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
| arrow | Optional. Defines whether a directional arrow is shown on the tooltip |
| at | Optional. Defines the tooltip placement relative to the hovered element |
| content | Optional. A Svelte component to render as the tooltip body |
| css | Adds a custom CSS class to the Tooltip |
| delay | Optional. Sets the delay in milliseconds before the tooltip is shown after hovering |
| overflow | Optional. Controls whether the tooltip is shown only when the anchor element's text is not fully visible |
| resolver | Optional. A function called on every hovered element that returns the tooltip content |
| touch | Optional. Defines whether tooltips are enabled on touch devices |