Newton's Programmatic Measurements

    react-tooltip-component-16

    0.3.2 • Public • Published

    React Tooltip

    A simple tooltip component for ReactJS. React v16 compatible fork of react-tooltip-component

    Installation

    npm install --save-dev react-tooltip-component-16

    Usage

    Style

    Webpack

    import 'react-tooltip-component-16/lib/tooltip.css';
    //require('react-tooltip-component-16/lib/tooltip.css');

    Other

    <link rel="stylesheet" type="text/css" href="path/to/react-tooltip-component-16/lib/tooltip.css">

    JS

    import Tooltip from 'react-tooltip-component-16';
     
    <Tooltip title='Tooltip on top' position='top'>
      <button className='btn btn-default'>Tooltip on top</button>
    </Tooltip>

    UMD

    <link rel="stylesheet" type="text/css" href="path/to/react-tooltip-component-16/dist/tooltip.css">
    <script src="path/to/react-tooltip-component-16/dist/react-tooltip-component-16.js"></script>
    const Tooltip = window.ReactTooltipComponent;

    Props

    Name Type Required Default Description
    title string true
    position string false top ['left', 'top', 'right', 'bottom']
    fixed bool false true fixed or not
    container element false document.body
    children node true

    Example

    View demo or example folder.

    Install

    npm i react-tooltip-component-16

    DownloadsWeekly Downloads

    14

    Version

    0.3.2

    License

    MIT

    Unpacked Size

    250 kB

    Total Files

    21

    Last publish

    Collaborators

    • boczeratul