npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

react-native-popover-reanimated

v0.3.0

Published

Popover view built with react-native-reanimated

Downloads

30

Readme

react-native-popover-reanimated

Popover view for React Native via react-native-reanimated

Installation

npm install react-native-popover-reanimated

Setup

import { PopoverManager } from 'react-native-popover-reanimated';

Wrap your application render with the PopoverManager component. Ensure react-native-gesture-handler has already been set up with the GestureHandlerRootView as well.

  return (
    <GestureHandlerRootView style={styles.flex}>
      <PopoverManager>
        {/* ... application ... */}
      </PopoverManager>
    </GestureHandlerRootView>
  );

Optional props

Additional props can be passed to the PopoverManager to customize the positioning behavior of the popover view. The default values can be seen here:

  <PopoverManager
    originAnchor="bottom"
    contentAnchor="top"
    offsetX={0}
    offsetY={0}
    padding={16}>
  • The anchors determine where the popover view will be presented
    • originAnchor refers to the view marked as the origin (originRef)
    • contentAnchor refers to the content rendered inside the popover view
    • The two views will line up on their respective anchors. With the default configuration above, the center-top of the content view will sit on the center-bottom of the origin view.
    • Possible values are: 'top-left' | 'top' | 'top-right' | 'left' | 'center' | 'right' | 'bottom-left' | 'bottom' | 'bottom-right'
  • offsetX/offsetY: amount in pixels to offset the content view on the respective axis
  • padding: amount in pixels that the content view will be clamped to/spaced from the edge of the screen

Usage

import { usePopoverView } from 'react-native-popover-reanimated';
  1. Define a render function that returns the contents you wish to place inside the popover view. To avoid unnecessary rerenders, this method should be defined with the useCallback hook.
  const renderContent = useCallback(() => (
    <View>
      <Text>Hello world</Text>
    </View>
  ), []);
  1. Call the usePopoverView hook, passing the render function as the first argument, in order to access the popover handlers.
  const { originRef, openPopover, closePopover } = usePopoverView(renderContent);
  1. Assign the originRef as the ref prop of a native view, such as a View. This component determines the visual origin at which the popover will appear when the openPopover method is invoked. The component must be backed by a native view in order to make use of the measure function. React Native will attempt to optimize the native view hierarchy by not rendering a View it deems unnecessary. Add the collapsable={false} prop to prevent this from happening.
  return (
    <View ref={originRef} collapsable={false}>
      <Button onPress={openPopover} title="Open popover" />
    </View>
  );
  1. Call the openPopover function from any source in order to present the popover view. Any touch down outside of the popover content bounds will instantly close the view.

The renderContent callback also provides a closePopover method as a parameter that can be used to trigger a close from within the popover content itself:

  const renderContent = useCallback((closePopover) => (
    <View>
      <Text>Hello world</Text>
      <Button title="Close" onPress={closePopover} />
    </View>
  ), []);

To override the configuration props set on the PopoverManager for a particular popover view, pass a partial configuration object as the second parameter of usePopoverView:

  const { originRef, openPopover } = usePopoverView(renderContent, {
    originAnchor: 'bottom-right',
    padding: 8,
  });

TODO

  • Popover styling, padding, animation configuration
  • Accessibility setup

Contributing

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

License

MIT