svelte-tooltip

Svelte Tooltip

Light weight (bare minimum) svelte-actions based tooltip⚡️⚡️

@sato0130/svelte-tooltip

Light weight svelte-action based tooltip.

Demo

https://svelte-tooltip-k-sato1995.vercel.app/

Installation

$ npm i @sato0130/svelte-tooltip

or

$ yarn add @sato0130/svelte-tooltip

Usage

  1. Import SvelteTooltip.
import SvelteTooltip from '@sato0130/svelte-tooltip';
  1. Use SvelteTooltip in the element you want the tooltip to be on

You can see the other options below.

<div use:SvelteTooltip={{ body: 'Tooltip content' }}>Hover Me</div>

Options

Name isRequired type Description
body true string, SvelteComponent Content in the tooltip
bodyAsHTML false false, true Render the content as HTML
place false top, bottom, right, left Place of the tooltip(Relative to the cursor)
type false dark, success, warning, error, info Tooltip theme
style false string custom style

License

MIT

Top categories

svelte logo

Want a Svelte site built?

Hire a Svelte developer
Loading Svelte Themes