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 🙏

© 2024 – Pkg Stats / Ryan Hefner

honeycomb-react-popover

v0.4.19

Published

A specification backed popover for react

Downloads

14

Readme

:toc: macro :toc-title: :toclevels: 99

react-popover

image:https://travis-ci.org/littlebits/react-popover.svg?branch=master["Build Status", link="https://travis-ci.org/littlebits/react-popover"]

toc::[]

Installation

yarn add react-popover

Demos

  • link:https://littlebits.github.io/react-popover/build/playground.html[Playground]
  • link:https://littlebits.github.io/react-popover/build/rows.html[Rows]
  • link:https://littlebits.github.io/react-popover/build/jsx.html[Using JSX]

To run demos locally execute yarn start. If you do not see logs in the console refresh the browser once (https://github.com/littlebits/react-popover/issues/35).

API

export default Popover(props, target)

props :: {...}


body :: Node | Array Node

The popover content. Content is rooted (becomes children of) .Popover-body and thus body can be a single node or an array of nodes.


isOpen :: Boolean

Determines Whether or not the popover is rendered.


preferPlace :: Enum String | Null

Sets a preference of where to position the Popover. Only useful to specify placement in case of multiple available fits. Defaults to null. Valid values are:

above | right | below | left :: Prefer an explicit side. row | column :: Prefer an orientation. start | end :: Prefer an order. null :: No preference, automatic resolution. This is the default.


place :: String | Null

Like preferPlace except that the given place is a requirement. The resolver becomes scoped or disabled. It is scoped if the place is an orientation or order but disabled if it is a side. For example place: "row" scopes the resolver to above or below placement but place: "above" removes any need for the resolver.


onOuterAction :: (Event) -> Void

A callback function executed every time the user does an action (mousedown or touchstart) outside the DOM tree of both Popover and Target. A canonical use-case is to automatically close the Popover on any external user action.


refreshIntervalMs :: Number | Falsey

The polling speed (AKA time between each poll) in milliseconds for checking if a layout refresh is required. This polling is required because it is the only robust way to track the position of a target in the DOM. Defaults to 200. Set to a falsey value to disable.


enterExitTransitionDurationMs :: Number | Falsey

The amount of time in milliseconds that it takes to complete the enter and exit animation. Defaults to '500'.


tipSize :: Number

Defines the size of the tip pointer. Use .01 to disable tip. Defaults to '7'.


Standard
  • Properties like className and style.

target :: React Element

  • The React Element that this popover will orient itself around. target rendering tree is unaffected. Popover will become its owner.

appendTarget :: DOM selector (String)

  • The DOM selector where this popover will be appended to. Default to 'body'.