New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@svelte-plugins/tooltips

Package Overview
Dependencies
Maintainers
1
Versions
23
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@svelte-plugins/tooltips

A simple tooltip action and component designed for Svelte.

0.1.2
Source
npm
Version published
Weekly downloads
4.1K
-18.33%
Maintainers
1
Weekly downloads
 
Created
Source

@svelte-plugins/tooltips

A simple tooltip action and component designed for Svelte.

Try it in the Svelte REPL.

Install

yarn add -D @svelte-plugins/tooltips

# or with NPM

npm i -D @svelte-plugins/tooltips

Using the Tooltip component

<script>
  import { Tooltip } from "@svelte-plugins/tooltips";
</script>

<Tooltip content="Hello world!">
 Check out my tooltip
</Tooltip>

Using the Tooltip action

<script>
  import { tooltip } from "@svelte-plugins/tooltips";
</script>

Checkout out my <u title="Hello World!" use:tooltip>tooltip</u>

Checkout out my <u use:tooltip={{ content: 'Hello World!' }}>tooltip</u>

API

Props

PropDescriptionValue
animationThe animation to apply to the tooltipstring (default: ``)
arrowIf false, the tooltip arrow will not be shown.boolean (default: true)
autoPositionAdjust tooltip position if viewport clipping occursstring (default: false)
contentThe string or object containing componentref and propsstring
maxWidthThe max allowable width of the tooltip contentnumber (default: 200)
positionThe position where the tooltip should appear relative to its parentstring (default: top)
themeThe CSS theme class namestring (default: ``)
Using components as content
PropDescriptionValue
content.componentSvelte componentcomponent (default: null)
content.propsAny component propetiesobject (default: null)
<script>
  import ComponentAsTooltip from './ComponentAsTooltip';
</script>

Checkout out my <span use:tooltip={{ content: { component: ComponentAsTooltip, props: { title: 'Hello World!' } } }}>tooltip</span>

Changelog

Changelog

License

MIT

Keywords

tooltips

FAQs

Package last updated on 22 Aug 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts