tooltips
- A simple tooltip action and component designed for Svelte applications.
- Provides both a
Tooltip
component andtooltip
action for flexible usage. - Supports Svelte 5 via a beta package version.
Key Features:
- Multiple trigger actions (hover, click, prop)
- Customizable animations and positioning
- Supports both string content and Svelte components as tooltip content
- Theming through CSS variables or inline styles
- Arrow visibility control and auto-positioning
Target Audience:
Svelte developers needing lightweight, customizable tooltips with component support.
Notable Svelte Support:
Primarily built for Svelte, with explicit Svelte 5 compatibility via a beta channel.
Content Flexibility:
- Basic text content via
content
prop - Full component support through
content.component
with props
Theming Options:
- Theme class with CSS variable overrides
- Direct style object injection
- Global CSS variable overrides
Example Usage Patterns:
<!-- Component usage -->
<Tooltip content="Hello!" position="right">Hover me</Tooltip>
<!-- Action usage -->
<div use:tooltip={{ content: "Dynamic tip" }}>Interactive element</div>
<!-- Component as content -->
<span use:tooltip={{ content: { component: CustomTip, props: { text: "Hi" } } }} />
sveltetooltipsactioncomponentsjavascriptsveltejstooltip
Featured Stories
No featured articles here. Navigate to an article, then pick the Feature on menu button