Measured entry

shadcn-chart

chartunclassified

A client-side React wrapper around Recharts that supplies a responsive container, theme-driven series colors, and coordinated tooltip and legend renderers. It ships as copied TSX source rather than a standalone widget, and relies on Recharts, the shadcn class-merging helper, Tailwind utilities, semantic theme tokens, and the registry's Lucide React dependency.

Specimen
Harness screenshot of shadcn-chart at 375 pixels wide
Harness screenshot at 375 pixels wide. No horizontal overflow recorded.
Harness screenshot of shadcn-chart at 768 pixels wide
Harness screenshot at 768 pixels wide. No horizontal overflow recorded.
Harness screenshot of shadcn-chart at 1440 pixels wide
Harness screenshot at 1440 pixels wide. No horizontal overflow recorded.

Measured

Every value below was written by the harness on the run that produced the frames above. None of it is derived from the prose.

Harness measurements recorded for shadcn-chart
BuildOK
MountOK
Console errors0
Uncaught page errors0
Horizontal overflowclean at 375, 768, 1440
Axe critical0
Axe serious0
Axe moderate0
Axe minor0
Gzip marginal99.9 KB (165.3 KB build, 65.4 KB baseline)
Bare modeFAIL
Provider requiredNO
Demo usedwritten from the component source API

What the harness recorded

BARE BUILD

✗ Build failed in 29.42s
error during build:
[vite:load-fallback] Could not load <sandbox>/src/lib/utils (imported by src/cut/components/ui/chart.tsx): ENOENT: no such file or directory, open '<sandbox>/src/lib/utils'

Verdict

A dependable choice for teams already building charts with Recharts and shadcn conventions. It built and mounted cleanly in the prepared harness, but the bare failure confirms it needs a shadcn-style setup, especially the class helper and styling foundation.

Use it if

  • You already use shadcn conventions and want charts to share the same color tokens and utility classes as the rest of the interface.
  • You need reusable tooltip and legend rendering across several Recharts chart types.
  • You want the chart wrapper in your source tree so its formatting and payload mapping can be adapted locally.

Skip it if

  • You need a ready-made chart with data fetching, axes, and series definitions included; this is supporting infrastructure, not a complete visualization.
  • You do not use Tailwind or shadcn theme tokens and do not want to recreate their styling conventions.
  • You are minimizing client-side chart dependencies, since adopting this wrapper also brings in Recharts.
  • You need a renderer that works without React or without client-side execution.

Install

Installation record for shadcn-chart
Declared dependenciesrecharts@3.8.0, lucide-react
Missing on installrecharts@3.8.0
Bare installfails once the shadcn-style helpers are removed, so it needs that setup
Providerno provider required in the harness

In a non-shadcn project, install Recharts and Lucide React, add a compatible class-merging helper or replace that import, configure the source alias, and supply Tailwind utilities plus the semantic color tokens used by the component. Keep it in a client-capable React boundary.

Source and credit

This page is a review, not a copy. The component source lives with its author and this site does not republish it. Read the license before you use anything.

Author repository

github.com/shadcn-ui/ui
License
MIT
Record published
2026-08-13

Alternatives

Other published entries for the chart pattern, ordered by what they measured: mounts first, then clean axe scans, then bare-mode passes, then the smaller bundle.