@reach/popover
Render a portal positioned relative to another element.
Last updated 5 years ago by mjackson .
MIT · Repository · Bugs · Original npm
$ cnpm install @reach/popover 
SYNC missed versions from official npm registry.

@reach/popover

Stable release MIT license

import React, { useRef, useState } from "react";
import Popover, { positionDefault } from "@reach/popover";

function Example() {
  const ref = useRef(null);
  const [value, setValue] = useState("");
  return (
    <div>
      <label>
        <span>Type for a special message</span>
        <input
          type="text"
          ref={ref}
          onChange={event => setValue(event.target.value)}
        />
      </label>

      {value.length > 0 && (
        <Popover targetRef={ref} position={positionDefault}>
          <div>
            <p>Whoa! Look at me!</p>
          </div>
        </Popover>
      )}
    </div>
  );
}

Current Tags

  • 0.10.3                                ...           latest (5 years ago)
  • 0.4.0-beta.0                                ...           next (6 years ago)

6 Versions

  • 0.17.0                                ...           3 years ago
  • 0.8.6                                ...           5 years ago
  • 0.4.0                                ...           6 years ago
  • 0.9.0                                ...           5 years ago
  • 0.4.0-beta.0                                ...           6 years ago
  • 0.10.3                                ...           5 years ago
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (5)
Dev Dependencies (0)
None
Dependents (0)
None

Copyright 2013 - present © cnpmjs.org