sveltejs-tippy
Version:
Tippy.js for Svelte
51 lines (36 loc) • 1.02 kB
Markdown
# sveltejs-tippy





Tippy.js for [Svelte](https://svelte.dev/).
## Install
```shell
$ npm i sveltejs-tippy
```
or
```shell
$ yarn add sveltejs-tippy
```
## How to use
### Example
[](https://codesandbox.io/s/sveltejs-tippy-h2ns7?fontsize=14&module=%2FApp.svelte)
```html
<script>
import tippy from "sveltejs-tippy";
const props = {
content: "<span class='tooltip'>Styled tooltip text</span>",
placement: "bottom"
};
</script>
<style>
:global(.tooltip) {
font-size: 1.2rem;
text-transform: uppercase;
}
</style>
<button use:tippy={props}>
Hover me
</button>
```