@reach-ui-fork/popover
TypeScript icon, indicating that this package has built-in type declarations

0.18.1 • Public • Published

@reach-ui-fork/popover

Stable release MIT license

import * as React from "react";
import { Popover, positionDefault } from "@reach-ui-fork/popover";

function Example() {
	const ref = React.useRef(null);
	const [value, setValue] = React.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>
	);
}

Readme

Keywords

none

Package Sidebar

Install

npm i @reach-ui-fork/popover

Weekly Downloads

131

Version

0.18.1

License

MIT

Unpacked Size

48.5 kB

Total Files

10

Last publish

Collaborators

  • yozi