recharts
10
总安装量
7
周安装量
#30384
全站排名
安装命令
npx skills add https://github.com/tartinerlabs/skills --skill recharts
Agent 安装分布
opencode
7
gemini-cli
7
github-copilot
7
codex
7
amp
7
kimi-cli
7
Skill 文档
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 rules/ for detailed patterns and code examples.
Rules Overview
| Rule | Impact | File |
|---|---|---|
| Container pattern | HIGH | rules/container-pattern.md |
| Theme integration | HIGH | rules/theme-integration.md |
| Custom components | HIGH | rules/custom-components.md |
Workflow
Building a chart?
- Detect setup â Confirm
rechartsis inpackage.json. Check if HeroUI v3 is installed (@heroui/reactor individual packages). Detect Tailwind CSS v4 (@tailwindcss/*). - Read rules â Read all files in
rules/to load the container pattern, theme token mapping, and custom component templates. - Fetch theme tokens â Use
mcp__heroui-react__get_theme_variablesto confirm the current HeroUI token names available in the project. - 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,
ResponsiveContaineris wrapped correctly, and tooltip uses HeroUI classes.
Reviewing existing charts?
- Scan â Glob for files importing from
recharts. Read each file and check against every rule inrules/. - 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
<AccessibilityLayer />as the first child inside every chart for screen reader support - Set
isAnimationActive={false}on chart elements when inside components that re-render frequently (tables, filters) - Recharts uses SVG â style with
strokeandfillprops, not CSScolor - Export chart prop interfaces separately so consumers can extend them
- Use
cartesianGridwithstrokeDasharray="3 3"and theme-aware stroke colour - Never set a fixed
widthonResponsiveContainerâ it must always bewidth="100%"
Assumptions
- React + TypeScript project
- Recharts installed (
rechartsin dependencies) - HeroUI v3 installed with Tailwind CSS v4
- CSS variables from HeroUI theme are available globally