# Stats Chart Tabs

> A polished analytics panel with an animated headline metric, a keyboard-friendly and controlled or uncontrolled period tab switcher, and a self-drawing area, line or bar chart. Each period can plot several series, such as revenue by channel, with individual accents, dashed lines and area fills; a previous period is drawn as a dashed comparison. Goal and average references, labelled event annotations, multi-series hover and keyboard tooltips, peak insight, axis labels and per-period summary figures are all optional. Visitors can switch the chart treatment, the plot measures its own width so curves and dots stay undistorted, and it ships as a card, glass surface or borderless panel with loading, empty and pre-focused tooltip states.

- Author: [terra vidhal](https://21st.dev/@infiniterraetincelle)
- Library: [PrequelUI Animate](https://21st.dev/@infiniterraetincelle/library/prequelui-animate)
- License: mit
- Tags: Dashboard, Tabs, Analytics, Chart
- npm dependencies: motion, lucide-react
- Live preview: https://21st.dev/@infiniterraetincelle/components/stats-chart-tabs

## Install

```bash
npx shadcn@latest add "https://21st.dev/r/infiniterraetincelle/stats-chart-tabs?api_key=$API_KEY_21ST"
```

Requires a 21st API key (generate one at https://21st.dev/mcp) passed as `API_KEY_21ST`. Free accounts get a limited number of installs per day; unlimited on a paid plan — see https://21st.dev/pricing.

Full component directory: https://21st.dev/llms.txt · More like this: https://21st.dev/community/components/s/dashboard.md
