react-native-tooltip-view

2.1.0 • Public • Published

react-native-tooltip-view

A dead simple tooltip view that you can populate yourself

Installation

$ yarn add react-native-tooltip-view

Be aware that this package depends on recompose and styled-components are peer dependencies. So if you aren't using them install with:

$ yarn add recompose styled-components

And you should totally give a try with those awesome packages!

Demo

alt text

Usage

import TooltipView from 'react-native-tooltip-view'
...
 
function Foo() {
  return (
    <TooltipView
      // `trigger` is what you want to be tapped by the user to toggle the tooltip visibility
      trigger={onPress => <RoundedIcon name="plus" size={20} roundSize={30} onPress={onPress} />}
      // you can pass an optional width for the tooltip
      width={200}
      // and also an optional background
      backgroundColor="#f9f9f9"
      // `triangleStyle`={{}} to style the little triangle
      // and any valid View props
    >
      {setMenuVisibility => (
        // anything you want in here
      )}
    </TooltipView>
  )
}

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 2.1.0
    17
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 2.1.0
    17
  • 2.0.0
    1
  • 1.0.1
    1
  • 1.0.0
    1

Package Sidebar

Install

npm i react-native-tooltip-view

Weekly Downloads

20

Version

2.1.0

License

MIT

Last publish

Collaborators

  • gabrielrubens