SpecOS SpecOS icon Styleguide

Tooltip

A tooltip component that displays additional information when hovering over an element. Built on top of bits-ui's Tooltip for accessibility.

Import

import Tooltip from "$lib/components/Tooltip.svelte";

Basic Usage

A simple tooltip that appears when hovering over a button.

Properties

text
Type
string
Default: ""
The text content to display in the tooltip.
sideOffset
Type
number
Default: 4
The distance between the tooltip and the trigger element.
openDelay
Type
number
Default: 0
The delay in milliseconds before the tooltip opens.