@sato0130/svelte-tooltip

0.0.4 • Public • Published

@sato0130/svelte-tooltip

npm bundle size npm

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

Package Sidebar

Install

npm i @sato0130/svelte-tooltip

Weekly Downloads

4

Version

0.0.4

License

MIT

Unpacked Size

18.4 kB

Total Files

21

Last publish

Collaborators

  • sato0130