Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

hint.css

Package Overview
Dependencies
Maintainers
1
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

hint.css

A tooltip library in CSS for your lovely websites.

  • 2.0.0
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

Hint.css npm version

A tooltip library in CSS for your lovely websites

hint.css is written as a pure CSS resource using which you can create cool tooltips for your web app. It does not rely on JavaScript but rather uses data- attribute*, pseudo elements, content property and CSS3 transitions to create the tooltips. Also it uses BEM naming convention particularly for the modifiers.

Read more about it.

Try it out:

http://kushagragour.in/lab/hint/

If you find this useful and want to show some love & encouragement, I am on Gittip.

Get Started

Get the library using one of the following ways:

  1. GitHub

Full build

Base build (Does not include color themes and fancy effects)

  1. Bower
bower install hint.css
  1. npm
npm install --save hint.css
  1. CDN

http://www.jsdelivr.com/#!hint.css https://cdnjs.com/libraries/hint.css

Now include the library in the HEAD tag of your page:

<link rel="stylesheet" href="hint.css"></link>

or

<link rel="stylesheet" href="hint.min.css"></link>

Now, all you need to do is give your element any position class and tooltip text using the data-hint attribute:

Hello Sir, <span class="hint--bottom" data-hint="Thank you!">hover me.</span>

Use it with other available modifiers in various combinations. Available modifiers:

  • hint--error
  • hint--info
  • hint--warning
  • hint--success
  • hint--always
  • hint--rounded
  • hint--no-animate
  • hint--bounce

Upgrading from v1.x

If you are already using v1.x, you may need to tweak certain position classes because of the way tooltips are positioned in v2.

Changing the prefix for class names

Don't like BEM naming (hint--) or want to use your own prefix for the class names?

Simply update src/hint-variables.scss and change the $prefix variable. To generate the css file, please read the contributing page.

Who's Using This?

Are you using hint.css in your awesome project too? Let us know on the mailing list.

Browser Support

hint.css works on all latest browsers, though the transition effect is supported only on IE10+, Chrome 26+ and FF4+ at present.

  • Chrome - basic + transition effects
  • Firefox - basic + transition effects
  • Opera - basic
  • Safari - basic
  • IE 10+ - basic + transition effects
  • IE 8 & 9 - basic

Contributing

hint.css is developed in SASS and the source files can be found in the src/ directory.

If you would like to create more types of tooltips/ fix bugs/ enhance the library etc. you are more than welcome to submit your pull requests.

Read more on contributing.

Changelog

See the Changelog

To catch all updates and discussion, join the mailing list: hintcss@googlegroups.com.

To subscribe: hintcss+subscribe@googlegroups.com or visit here.

License

Copyright (c) 2013-2016 Kushagra Gour Licensed under the MIT license.

Credits

This doesn't make use of a lot of BEM methodology but big thanks to @csswizardry, @necolas for their awesome articles on BEM and to @joshnh through whose work I came to know about it :)

Keywords

FAQs

Package last updated on 25 Jan 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc