BlockDex

Components

Registries

Free blocks

Method

BlockDex

Components

Registries

Free blocks

Method

Open API

BlockDex

Components

Registries

Free blocks

Method

Open API

Components/EvilCharts/recharts-bar-chart

recharts-bar-chart

evilcharts/recharts-bar-chart
FreeComponent

Bar chart component

Install it

npx shadcn@latest add https://evilcharts.com/r/recharts-bar-chart.json

Source

src/registry/charts/recharts-bar-chart.tsxevilcharts.com/r/recharts-bar-chart.json · first 6 KB
1"use client";
2
3import {
4 Bar as RechartsBar,
5 BarChart as RechartsBarChart,
6 CartesianGrid,
7 Rectangle,
8 ReferenceLine,
9 XAxis as RechartsXAxis,
10 YAxis as RechartsYAxis,
11} from "recharts";
12import {
13 Children,
14 createContext,
15 isValidElement,
16 use,
17 useCallback,
18 useId,
19 useMemo,
20 useRef,
21 useState,
22 type ComponentProps,
23 type ReactNode,
24} from "react";
25import {
26 type ChartConfig,
27 ChartContainer,
28 getColorsCount,
29 getLoadingData,
30 LoadingIndicator,
31} from "@/registry/ui/recharts-chart";
32import {
33 ChartTooltip,
34 ChartTooltipContent,
35 type TooltipRoundness,
36 type TooltipVariant,
37} from "@/registry/ui/recharts-tooltip";
38import { ChartLegend, ChartLegendContent, type ChartLegendVariant } from "@/registry/ui/recharts-legend";
39import { Brush, EvilBrush, useEvilBrush, type BrushProps, type EvilBrushRange } from "@/registry/ui/recharts-brush";
40import { ChartBackground, type BackgroundVariant } from "@/registry/ui/recharts-background";
41import { RectRadius } from "recharts/types/shape/Rectangle";
42import { motion, useReducedMotion } from "motion/react";
43
44// Constants
45const DEFAULT_BAR_RADIUS = 2;
46const LOADING_BAR_DATA_KEY = "loading";
47const LOADING_ANIMATION_DURATION = 2000; // in milliseconds
48const STACK_ID = "evil-stacked";
49const BAR_GROW_DURATION = 0.5; // per-bar grow-in length, in seconds
50const BAR_STAGGER = 0.05; // delay between consecutive bars, in seconds
51const REVEAL_EASE: [number, number, number, number] = [0, 0.7, 0.5, 1]; // grow-in easing
52
53type BarVariant = "default" | "hatched" | "duotone" | "duotone-reverse" | "gradient" | "stripped";
54type StackType = "default" | "stacked" | "percent";
55type BarLayout = "vertical" | "horizontal";
56
57/**
58 * Order in which bars grow into view. Recharts' own bar animation is permanently
59 * disabled — every bar instead grows from its baseline (bottom for vertical
60 * layout, left for horizontal), and this controls the stagger sequence.
61 *
62 * NOTE: the grow-in is a per-frame animation, so it is heavier than a static
63 * chart. `"none"` opts out entirely; it is also what a device with the OS
64 * "reduce motion" preference falls back to automatically.
65 */
66type BarAnimationType = "none" | "left-to-right" | "right-to-left" | "center-out" | "edges-in";
67
68// ─────────────────────────────────────────────────────────────────────────────
69// Shared context
70// … truncated

What it pulls in

npm packages

  • recharts
  • motion

Other registry items

  • @evilcharts/recharts-chart
  • @evilcharts/recharts-tooltip
  • @evilcharts/recharts-legend
  • @evilcharts/recharts-brush
  • @evilcharts/recharts-background

Files it writes

  • src/registry/charts/recharts-bar-chart.tsx

Facts

Registry
EvilCharts
Type
registry:component
Access
Free
Files written
1
Licence
MIT
In the index
at or before 2026-08-13
Last confirmed
today

Go to the source

evilcharts.com legions-developer/evilcharts on GitHub Raw registry item This item as JSON

More from EvilCharts

All 271 items
Same registry, same kind — the ones you would have found next
ComponentRegistryKindAccessInstallsCommand
echarts-area-chartecharts-area-chartEvilChartsComponentsFree2 deps
echarts-bar-chartecharts-bar-chartEvilChartsComponentsFree2 deps
echarts-brushecharts-brushEvilChartsComponentsFree1 dep
echarts-chartecharts-chartEvilChartsComponentsFree1 dep
echarts-composed-chartecharts-composed-chartEvilChartsComponentsFree2 deps
echarts-dotecharts-dotEvilChartsComponentsFree1 dep
echarts-legendecharts-legendEvilChartsComponentsFreeno deps
echarts-line-chartecharts-line-chartEvilChartsComponentsFree2 deps

Also from Kynth Studios

Built for the same person as BlockDex

SkillWorks

Claude Code skills and plugins, scored

skillworks.kynth.studio

RuleStack

AGENTS.md gallery and agent-config comparison

rulestack.kynth.studio

ToolDrift

What the AI coding tools changed last night

tooldrift.kynth.studio

The studio list

One product, taken apart, once a month

Kynth Studios pulls one shipped product open every month — what it does, what it cost to build, what the pipeline behind it looks like, and what the numbers did. One email a month, nothing in between.

Double opt-in — we send one confirmation link and nothing else until you click it.

BlockDex

Built by

Kynth Studios

the studio behind SkillWorks, RuleStack and ToolDrift

part of Toolproof, the measurement layer for AI agent tooling

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

© 2026 BlockDex. A Kynth Studios product. Changelog

BlockDex

The studio list

One product, taken apart, once a month

Kynth Studios pulls one shipped product open every month — what it does, what it cost to build, what the pipeline behind it looks like, and what the numbers did. One email a month, nothing in between.

Double opt-in — we send one confirmation link and nothing else until you click it.

BlockDex

Built by

Kynth Studios

the studio behind SkillWorks, RuleStack and ToolDrift

part of Toolproof, the measurement layer for AI agent tooling

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

© 2026 BlockDex. A Kynth Studios product. Changelog

BlockDex

The studio list

One product, taken apart, once a month

Kynth Studios pulls one shipped product open every month — what it does, what it cost to build, what the pipeline behind it looks like, and what the numbers did. One email a month, nothing in between.

Double opt-in — we send one confirmation link and nothing else until you click it.

BlockDex

Built by

Kynth Studios

the studio behind SkillWorks, RuleStack and ToolDrift

part of Toolproof, the measurement layer for AI agent tooling

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

© 2026 BlockDex. A Kynth Studios product. Changelog

BlockDex