npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

minitooltip

v0.2.8

Published

The tooltip solution for minimalists

Downloads

25

Readme

minitooltip

A minimalist tooltip solution, perfect for fast and beautiful websites

  • Lightweight - Around 3KB in minified version
  • Independent - Don't require jQuery or any other library
  • Simplest - Call minitooltip and done! You got tooltips

Installing

yarn

$ yarn add minitooltip

npm

$ npm install minitooltip --save

bower

$ bower install minitooltip --save

manual

<script src="path/to/minitooltip.min.js"></script>

Getting Started

The simplest way

Put the 'minitooltip' class on your body tag, and all title attributes will be transformed into tooltips

<body class="minitooltip">
  <h1 title="A tooltip here">Very simple!</h1>
</body>

Setup with classes

All elements with 'tip' class and title attribute will receive tooltips

<h1 class="tip" title="I'm a tooltip!">Another simple way</h1>
<h2 class="tip tip-down" title="YES!">A tooltip with arbitrary position</h2>

Setup with data-attributes

If you want, it is also possible to work with data-attributes

<ul>
  <li data-tip="HEY">A tooltip without title</li>
  <li data-tip="HO" data-tip-position="down">Another arbitrary position</li>
</ul>

Styling

Setting the global theme

The default global theme is Dark, but you can change it adding the 'minitooltip-light' class on your body tag

<body class="minitooltip-light">
  <h1 data-tip="A dark website">With a light tooltip</h1>
</body>

Setting a single tooltip theme

You can set the theme of a single tooltip with the classes 'tip-dark' and 'tip-light'. And, if you prefer, can define this with data attributes

<h1 class="tip tip-dark" title="A dark tip here">foo</h1>
<h2 data-tip="A light tip here" data-tip-theme="light">bar</h2>

Hacking the themes

The minitooltip themes is just css, so you can override his styles with more css

#tip{ background: red !important; }
#tip[data-tip-position=up]:after{ border-top-color: red !important; }
#tip[data-tip-position=down]:after{ border-bottom-color: red !important; }

Contributing

Like the library? Feel free to contribute! Make your fork, submit your pull request and help to grow it

License

minitooltip is freely distributable under the MIT license