With such a bizarre name, we wouldn’t design many from Wenk, a giveaway CSS tooltip library. Yet it’s one of a smallest libraries we can get measuring underneath 1KB when gzipped.
Recommended Reading: Creating Animated Tooltip Easily with Hint.css
Wenk uses pure CSS with
data-* attributes to emanate live tooltips that we can restyle and position to your liking. Best of all, it’s a totally giveaway library with source formula accessible on GitHub.
These lightweight tooltips are super elementary to supplement to your website. You only need a
Wenk.css record added to your page header, that we can download from a GitHub repo.
Or, we could even add a CDN file that is hosted on GitHub’s CDN. Here’s a formula for that:
link rel="stylesheet" href="https://cdn.rawgit.com/tiaanduplessis/wenk/master/dist/wenk.css"
Or, if you’re an npm/bower fan we can implement this package from a terminal.
The default tooltip tags do not have many tradition data. They let we select a position and a width, though we have to manually change a CSS if we wish them styled differently.
For example, we competence wish a CSS arrow combined to a tooltip that appears above a tooltip element. This is sincerely elementary to emanate though you’ll need to scour a Wenk stylesheet to find a accurate CSS class to extend.
Here’s a representation of some default code for Wenk tooltips:
!-- instance of Wenk tooltip appearing on a right -- span data-wenk="I'm to a right!" data-wenk-pos="right" Wenk to a right! /span
The categorical Wenk alighting page includes live demos that we can exam by hovering. These are the many simple tooltips you’ll get though they’re ideal for a library that weighs reduction than a kilobyte.
One vital thing to cruise is browser support. All versions of Chrome and Firefox should work fine. Same with Opera 12+ and Opera Mini v8+. But IE8 and IE10 seem to have trouble digest these tooltips. Thankfully, their marketplace share is dropping quick though it’s something to cruise before using.
I’m still vacant how many we can do with so few KBs. The Wenk library is a covenant to complicated frontend growth and it shows that a small can go a prolonged way.
You can puncture by a entire source on GitHub, along with live demos and code snippets to set adult emanate these tooltips for your possess site.