Skip to content

dialog 0.16.4

Install from the command line:
Learn more about npm packages
$ npm install @palmetto/dialog@0.16.4
Install via package.json:
"@palmetto/dialog": "0.16.4"

About this version

@reach/dialog

Stable release MIT license

Docs | Source | WAI-ARIA

An accessible dialog or modal window.

import { Dialog } from "@reach/dialog";
import "@reach/dialog/styles.css";

function Example(props) {
  const [showDialog, setShowDialog] = React.useState(false);
  const open = () => setShowDialog(true);
  const close = () => setShowDialog(false);

  return (
    <div>
      <button onClick={open}>Open Dialog</button>
      <Dialog isOpen={showDialog} onDismiss={close}>
        <button className="close-button" onClick={close}>
          <VisuallyHidden>Close</VisuallyHidden>
          <span aria-hidden>×</span>
        </button>
        <p>Hello there. I am a dialog</p>
      </Dialog>
    </div>
  );
}

Details


Assets

  • dialog-0.16.4-npm.tgz

Download activity

  • Total downloads 18,530
  • Last 30 days 691
  • Last week 142
  • Today 0

Recent versions

View all