BO

Bounds

@visx/bounds

Utilities to make your life with bounding boxes better

Charts
visx
react
visualizations
charts
@visx/bounds
javascript
npm
frontend
open source
ui
Stars
337
Weekly
1.0M
Open issues
4
Bundle
~25 kB

Installation

npm install @visx/bounds

Code example

import { Bounds } from "@visx/bounds";

const data = [
  { name: "Jan", value: 12 },
  { name: "Feb", value: 18 },
];

export function Example() {
  return (
    <Bounds data={data} width={420} height={240}>
      {/* series / axes from Bounds */}
    </Bounds>
  );
}

Pros & cons

Pros

  • Actively maintained by Chris Williams @williaster
  • 1.0M weekly downloads. Battle tested
  • First-class TypeScript definitions
  • MIT licensed

Considerations

  • Adds roughly ~25 kB to your bundle
  • Needs client-only rendering in SSR frameworks
  • Not supported in React Native
  • 4 open issues on GitHub

FAQs

Alternatives & similar libraries