Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/thetrisatria/sveltip

Simple tooltip component for Svelte
https://github.com/thetrisatria/sveltip

component svelte svelte3

Last synced: 4 days ago
JSON representation

Simple tooltip component for Svelte

Awesome Lists containing this project

README

        

# Sveltip

Simple tooltip component for [Svelte](https://svelte.dev), comes with light and dark theme.

## Get started

### Installation
```sh
npm install sveltip
```

### Usage
First you need to import it on the script section
```js
// ...
import Sveltip from 'sveltip';
// ...
```
and then use it on your application. Here's some example code:
```html

Start


Start


Lorem Ipsum



```

### Properties
These are all available props, please refer the sample above on how they work
```js
text
// Text displayed on the tooltip
```
```js
light
// Light mode for the tooltip bubble
```
```js
dark
// Dark mode for the tooltip bubble
```
```js
top
// Put the tooltip on the top of element
```
```js
bottom
// Put the tooltip on the bottom of element
```
```js
left
// Put the tooltip on the left side of element
```
```js
right
// Put the tooltip on the left side of element
```