Ecosyste.ms: Awesome

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

https://github.com/tiaanduplessis/wenk

:wink: Lightweight pure CSS tooltip for the greater good
https://github.com/tiaanduplessis/wenk

css less scss stylus tooltip wenk

Last synced: 22 days ago
JSON representation

:wink: Lightweight pure CSS tooltip for the greater good

Lists

README

        


wenk




Lightweight pure CSS tooltip for the greater good





Package version


Downloads


Standard


Travis Build


GitHub version


License


PRs


Greenkeeper






Github Watch Badge


Github Star Badge


Tweet

## Table of Contents

- [About](#about)
- [As Seen in](#as-seen-in)
- [Why](#why)
- [Install](#install)
- [Usage](#usage)
- [Demo](#demo)
- [Support](#support)
- [Contributing](#contributing)
- [License](#license)

## About

**Wenk** is a Lightweight tooltip available in pure CSS, [cssnext](http://cssnext.io/) using [PostCSS](http://postcss.org/), [Less](https://raw.githubusercontent.com/tiaanduplessis/wenk/master/src/wenk.less) or [SCSS](https://raw.githubusercontent.com/tiaanduplesssis/wenk/master/src/wenk.scss).

## As Seen in

- [20 Awesome Javascript & CSS Tooltip Libraries](https://bashooka.com/coding/javascript-css-tooltip-libraries/)
- [Create Minified Tooltips in Pure CSS with Wenk](https://www.hongkiat.com/blog/pure-css-lightweight-tooltip-wenk/)

## Why

- It's Lightweight with the **minified version being only 733 bytes when gzipped** :scream:
- It's easy to use
- It's easy to customize
- It's pure CSS
- You're already here

## Install

**Install with cdn**

```html

```

**Install with npm**

```sh
$ npm install wenk
```

**Install with yarn**

```sh
$ yarn add wenk
```

## Usage


wenk

Simply add the `data-wenk` attribute to your HTML with the text you want to display.
```html

```

You can display the tooltip at different positions using the `data-wenk-pos` attribute or the `.wenk--*` class. The default position is at the top.
```html
Wenk to the right!
Wenk to the left!
Wenk to the button!

Wenk to the right!
Wenk to the left!
Wenk to the button!
```

The width of the tooltip can also easily be changed.
```html
Small wenk!
Medium wenk!
Large wenk!
I fit just right!

Small wenk!
Medium wenk!
Large wenk!
I fit just right!
```

You can also align your text within the container
```html

Wenk to the right!


Wenk in the center!


```

## Demo

Check out the demo [here](https://tiaanduplessis.github.io/wenk/).

## Support

According to [doiuse.com](http://www.doiuse.com/) the following browsers are currently missing support:
- IE (8,10)
- Opera (12.1)
- Opera Mini (5.0-8.0)
- IE Mobile (10)

## Contributing

All Contributions are welcome! Please open up an issue if you would like to help out. :smile:

## License

Licensed under the MIT License.