🚨 Active Supply Chain Attack:node-ipc Package Compromised.Learn More →
Socket
Book a DemoSign in
Socket

small-tooltip

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

small-tooltip

Just a small tooltip for ES6 and/or React.

latest
Source
npmnpm
Version
1.1.3
Version published
Maintainers
1
Created
Source

small-tooltip

NPM version

Just a small tooltip for ES6 and/or React.

smallTooltip

Installation

$ npm install small-tooltip

Examples


  // just paste these few lines of code in your main file (index.js.. or app.js..)
  // that's it, I will be always available in all the pages of your project!
  // ..available for the dynamic elements as well..

  import SmallTooltip from 'small-tooltip';
  import 'small-tooltip/smallTooltip.css';    // <-- easy to customize

  const smallTooltip = new SmallTooltip();
  smallTooltip.init();


  <!-- html  ********** -->

  <!-- insert <div id="small-tooltip"></div> somewhere on your main project file (index.js, app.js..), of course just one time! -->
  <div id="small-tooltip"></div>

  <!-- example of usage -->  
  <div data-tip="I'm a small tooltip">Move your mouse here to see me</div>


  // simple javascript **********

  // insert <div id="small-tooltip"></div> somewhere on your main project file (index.js, app.js..), of course just one time!
  document.body.insertAdjacentHTML('beforeend', `<div id="small-tooltip"></div>`);

  // example of usage
  document.body.insertAdjacentHTML('beforeend', `
    <i data-tip="I'm a lovely small tooltip!!">❤❤❤</i>
  `);


  // or React **********

  function App() {

    return (
      <>

        {
          // insert <div id="small-tooltip"></div> somewhere on your main project file (index.js, app.js..), of course just one time!
          <div id="small-tooltip"></div>
        }
        
        {
          // example of usage
          <h2 data-tip="I'm another small tooltip">Move your mouse here to see me as well!</h2>
        }

      </>
    );

  }

Demo

Just a example project where you can see small-tooltip in action..

License

Licensed under MIT

Keywords

tooltip

FAQs

Package last updated on 07 Oct 2020

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