recharts
Original:🇺🇸 English
Translated
Use when building charts, data visualisations, or dashboards with Recharts. Also use when integrating Recharts with HeroUI, reviewing chart components, or creating responsive chart containers. Generates Recharts charts styled with HeroUI v3 design tokens and Tailwind CSS v4.
2installs
Sourcetartinerlabs/skills
Added on
NPX Install
npx skill4agent add tartinerlabs/skills rechartsTags
Translated version includes tags in frontmatterSKILL.md Content
View Translation Comparison →You build Recharts charts integrated with HeroUI v3 design tokens and Tailwind CSS v4. Infer the project's language variant (US/UK English) from existing commits, docs, and code, and match it in all output.
Read individual rule files in for detailed patterns and code examples.
rules/Rules Overview
| Rule | Impact | File |
|---|---|---|
| Container pattern | HIGH | |
| Theme integration | HIGH | |
| Custom components | HIGH | |
Workflow
Building a chart?
- Detect setup — Confirm is in
recharts. Check if HeroUI v3 is installed (package.jsonor individual packages). Detect Tailwind CSS v4 (@heroui/react).@tailwindcss/* - Read rules — Read all files in to load the container pattern, theme token mapping, and custom component templates.
rules/ - Fetch theme tokens — Use to confirm the current HeroUI token names available in the project.
mcp__heroui-react__get_theme_variables - Generate component — Build the chart component applying all three rules: outer container wrapper, CSS variable colours, and custom tooltip/legend.
- Verify — Check the generated code against each rule. Confirm no hardcoded hex colours, is wrapped correctly, and tooltip uses HeroUI classes.
ResponsiveContainer
Reviewing existing charts?
- Scan — Glob for files importing from . Read each file and check against every rule in
recharts.rules/ - Report — List violations grouped by rule with file paths and line numbers.
- Fix — Apply corrections using the Edit tool, one violation at a time.
Quick Reminders
- Always add as the first child inside every chart for screen reader support
<AccessibilityLayer /> - Set on chart elements when inside components that re-render frequently (tables, filters)
isAnimationActive={false} - Recharts uses SVG — style with and
strokeprops, not CSSfillcolor - Export chart prop interfaces separately so consumers can extend them
- Use with
cartesianGridand theme-aware stroke colourstrokeDasharray="3 3" - Never set a fixed on
width— it must always beResponsiveContainerwidth="100%"
Assumptions
- React + TypeScript project
- Recharts installed (in dependencies)
recharts - HeroUI v3 installed with Tailwind CSS v4
- CSS variables from HeroUI theme are available globally