76

GitHub - diegohaz/reakit: Toolkit for building interactive UIs with React

 5 years ago
source link: https://github.com/diegohaz/reakit
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

README.md




reakit



Generated with nod NPM version Build Status Coverage Status


Toolkit for building composable, accessible and reliable UIs with React.

Installation

npm i reakit

Thanks to @nosebit for the package name on npm.

Example

35465289-0cb7fe96-02e2-11e8-8bc5-60abcb6e92ac.gif
See and edit full source code on CodeSandbox

import React from "react";
import { render } from "react-dom";
import { Button, Popover } from "reakit";

const App = () => (
  <Popover.Container>
    {popover => (
      <Button as={Popover.Toggle} {...popover}>
        Toggle
        <Popover {...popover}>
          <Popover.Arrow />
          Popover
        </Popover>
      </Button>
    )}
  </Popover.Container>
);

render(<App />, document.getElementById("root"));

Performance

Benchmark done using react-benchmark with MacBook Pro (Retina, 13-inch, Late 2013). Clone the repository and run yarn && yarn benchmark to see the results.

Library ops/sec react 103,029 reakit (as) 45,975 antd 29,122 reakit (Base) 17,071 reakit (Button) 12,107 material-ui 9,840 rebass 7,989

License

MIT © Diego Haz


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK