Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
V

visx

> 前端框架
Open source

🐯 visx | visualization components

21.0K stars0 likes0 views
WebsiteGitHub

About

🐯 visx | visualization components

visx

visx is a collection of reusable low-level visualization components. visx combines the power of d3 to generate your visualization with the benefits of react for updating the DOM.

[!IMPORTANT] visx v4 is the current stable release and requires React 18 or 19.

bash
npm install @visx/shape

Upgrading from v3? See the visx 4 migration guide.


Docs • Gallery • Changelog • Migration

Usage

Let's make a simple bar graph.

First we'll install the relevant packages:

bash
npm install --save @visx/mock-data @visx/group @visx/shape @visx/scale
…

For more examples using visx, check out the gallery.

Motivation

Goal

The goal is to create a library of components you can use to make both your own reusable chart library or your slick custom one-off chart. visx is largely unopinionated and is meant to be built upon. Keep your bundle sizes down and use only the packages you need.

How?

Under the hood, visx is using d3 for the calculations and math. If you're creating your own awesome chart library on top of visx, it's easy to create a component api that hides d3 entirely. Meaning your team could create charts as easily as using reusable react components.

But why?

Mixing two mental models for updating the DOM is never a good time. Copy and pasting d3 code into useEffect() is just that. This collection of components lets you easily build your own reusable visualization charts or library without having to learn d3. No more selections or enter()/exit()/update().

FAQ

  1. What does visx stand for?

    visx stands for visualization components.

  2. Do you plan on supporting animation/transitions?

    A common criticism of visx is it doesn't have animation baked in, but this was a conscious choice. It's a powerful feature to not bake it in.

    Imagine your app already bundles react-motion, adding a hypothetical @visx/animation is bloat. Since visx is react, it already supports all react animation libs.

    Charting libraries are like style guides. Each org or app will eventually want full control over their own implementation.

    visx makes this easier for everyone. No need to reinvent the wheel each time.

    more info: https://github.com/airbnb/visx/issues/6

  3. Do I have to use every package to make a chart?

    nope! pick and choose the packages you need.

  4. Can I use this to create my own library of charts for my team?

    Please do.

  5. Does visx work with preact?

    yup! alias react + react-dom to preact/compat. For visx v4, configure your package manager to satisfy the React 18/19 peer dependency range.

  6. I like using d3.

    Me too.

Thanks

Thanks to Happo for providing the visual regression testing platform that helps us review UI changes and catch unintended visual regressions.

Development

Please see CONTRIBUTING.md

:v:

MIT

Issues· 153 open

View all issuesOpen on GitHub
  • #1731

    Whisker calculation (min/max) in box plot not considering actual datapoints if there are outliers

    Updated Sep 16, 2026
  • #845

    Brush interaction not working on mobile

    🐛 bug👋 help wanted@visx/brush@visx/dragUpdated Sep 1, 2026
  • #2031

    visx packages are incompatible with the latest version of @types/d3-shape (3.2.0)

    Updated Sep 1, 2026
  • #2029

    useDrag/Drag: isDragging never resets on pointercancel, only pointerup (affects BaseBrush too)

    Updated Aug 13, 2026
  • #2027

    An overflow occurred in the Tooltip component of the xychart package, causing horizontal and vertical scrollbars to appear on the page.

    Updated Jul 30, 2026
  • #1984

    Bug: LegendOrdinal `shape="rect"` does not appear in print / print preview

    Updated Mar 10, 2026
  • #1681

    @visx/xychart AnimatedLineSeries does not animate on start

    Updated Jan 16, 2026
  • #1764

    Support for Grouped Bar Stacks

    Updated Nov 19, 2025
  • #1974

    Drag to Zoom is not available

    Updated Nov 19, 2025
  • #1699

    XYChart tooltip visual glitch

    needs followupUpdated Oct 12, 2025

> Tags

TypeScriptchartd3data-visualizationreact

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedOct 1, 2026
Category前端框架
PricingOpen source

> Related tools

R
React
用于构建用户界面的 JavaScript 库
V
Vue.js
渐进式 JavaScript 框架
N
Next.js
基于 React 的全栈 Web 框架