react-native-reanimated-tooltip
TypeScript icon, indicating that this package has built-in type declarations

0.1.4 • Public • Published

react-native-reanimated-tooltip

Tooltip for React Native using React Native Reanimated and @gorhom/portal

Demo 1

Installation

npm install react-native-reanimated @gorhom/portal react-native-reanimated-tooltip

Usage

import { PortalProvider } from '@gorhom/portal';
import React from 'react';
import { Text, Button } from 'react-native';
import { Tooltip } from 'react-native-reanimated-tooltip';
import { FadeOut, FadeIn } from 'react-native-reanimated';

const [visible, setVisible] = React.useState(false);
<PortalProvider>
  <Tooltip
    content={
      <Text>Tooltip</Text>
    }
    visible={visible}
    onPress={() => {
      setVisible(false);
    }}
    entering={FadeIn}
    exiting={FadeOut}
  >
    <Button
      title="Toggle tooltip"
      onPress={() => {
        setVisible(true);
      }}
    />
  </Tooltip>
</PortalProvider>

Configuration

Check TooltipProps

Contributing

See the contributing guide to learn how to contribute to the repository and the development workflow.

License

MIT


Made with create-react-native-library

Package Sidebar

Install

npm i react-native-reanimated-tooltip

Weekly Downloads

398

Version

0.1.4

License

MIT

Unpacked Size

55.9 kB

Total Files

24

Last publish

Collaborators

  • johankasperi