Tremor React is a comprehensive React component library built on Tailwind CSS providing 60+ components for building data visualizations, charts, and analytical dashboards.
npx @tessl/cli install tessl/npm-tremor--react@3.18.0React component library built on Tailwind CSS with 60+ components for data visualizations, charts, and analytical dashboards.
Package: @tremor/react v3.18.7 | Install: npm install @tremor/react
Peer Deps: react ^18.0.0, react-dom >=16.6.0
import { Card, Title, BarChart } from '@tremor/react';
const data = [
{ name: 'Jan', sales: 2890 },
{ name: 'Feb', sales: 2756 },
];
<Card>
<Title>Sales</Title>
<BarChart
data={data}
index="name"
categories={['sales']}
colors={['blue']}
valueFormatter={(v) => `$${v.toLocaleString()}`}
/>
</Card>Use this quick reference to find the right component:
| Need | Component | Category |
|---|---|---|
| Display chart data | AreaChart, BarChart, LineChart, DonutChart, ScatterChart, FunnelChart | Charts |
| Show rankings/comparisons | BarList | Visualization |
| Display progress | ProgressBar, ProgressCircle | Visualization |
| Show distribution | CategoryBar, DeltaBar, MarkerBar | Visualization |
| Timeline status | Tracker | Visualization |
| Container/card | Card, Dialog | Layout |
| Grid/flex layout | Grid, Flex, Col | Layout |
| Collapsible sections | Accordion | Layout |
| Text input | TextInput, NumberInput, Textarea, SearchSelect | Input |
| Selection | Select, MultiSelect, DatePicker, DateRangePicker | Input |
| Actions | Button, Tabs, Switch | Input |
| Typography | Title, Subtitle, Text, Metric, Callout | Text |
| Status/labels | Badge, BadgeDelta, Icon | Icon |
| Data tables | Table, TableHead, TableBody, List | List |
| Inline charts | SparkLineChart, SparkAreaChart, SparkBarChart | Charts |
// All components export from main package
import {
// Charts
AreaChart, BarChart, LineChart, DonutChart, ScatterChart, FunnelChart,
SparkLineChart, SparkAreaChart, SparkBarChart,
// Layout
Card, Flex, Grid, Col, Divider, Dialog, DialogPanel, Accordion,
AccordionList, AccordionHeader, AccordionBody,
// Visualization
BarList, ProgressBar, ProgressCircle, CategoryBar, DeltaBar, MarkerBar, Tracker,
// Input
Button, TextInput, NumberInput, Textarea, Switch,
Select, SelectItem, MultiSelect, MultiSelectItem,
SearchSelect, SearchSelectItem, DatePicker, DateRangePicker, DateRangePickerItem,
TabGroup, TabList, Tab, TabPanels, TabPanel,
// Text
Title, Subtitle, Text, Metric, Bold, Italic, Callout, Legend,
// Icon
Icon, Badge, BadgeDelta,
// List
List, ListItem, Table, TableHead, TableBody, TableFoot, TableRow,
TableHeaderCell, TableCell, TableFooterCell,
// Types
type Color, type Size, type ValueFormatter, type CurveType, type DeltaType,
type EventProps, type CustomTooltipProps, type ButtonVariant, type IconVariant,
// Utils
getIsBaseColor,
} from '@tremor/react';
// CommonJS also supported
const { AreaChart, Card } = require('@tremor/react');Important Types - See common-props.md for complete type definitions.
Full-featured charts built on Recharts. All share BaseChartProps.
| Component | Use Case | Key Props |
|---|---|---|
| AreaChart | Trends, cumulative values | stack, curveType, showGradient, connectNulls |
| BarChart | Comparisons across categories | layout: "vertical"|"horizontal", stack, relative |
| LineChart | Trends over time | curveType, connectNulls |
| DonutChart | Categorical proportions | variant: "donut"|"pie", label, showLabel |
| ScatterChart | Multi-dimensional relationships | x, y, category, size, sizeRange |
| FunnelChart | Conversion rates, pipelines | variant: "base"|"center", calculateFrom, evolutionGradient |
Spark Charts (compact versions): SparkLineChart, SparkAreaChart, SparkBarChart - same props but minimal chrome.
Specialized data display components.
| Component | Purpose | Key Props |
|---|---|---|
| BarList | Rankings, sorted comparisons | data, sortOrder, valueFormatter |
| ProgressBar | Linear progress 0-100 | value, color, showAnimation |
| ProgressCircle | Circular progress | value, size, children (center content) |
| CategoryBar | 100% stacked distribution | values, colors, markerValue |
| DeltaBar | +/- change visualization | value, isIncreasePositive |
| MarkerBar | Progress with target | value, minValue, maxValue |
| Tracker | Timeline status blocks | data: {color, tooltip}[] |
Detailed Visualization Documentation
Container and structure components.
| Component | Purpose | Key Props |
|---|---|---|
| Card | Content container | decoration, decorationColor |
| Flex | Flexbox layout | flexDirection, justifyContent, alignItems |
| Grid | Responsive grid | numItems, numItemsSm/Md/Lg |
| Col | Grid column | numColSpan, numColSpanSm/Md/Lg |
| Divider | Visual separator | children (optional label) |
| Dialog | Modal overlay | open, onClose, static, unmount |
| Accordion | Collapsible sections | defaultOpen |
Form controls and interactive elements.
| Component | Purpose | Key Props |
|---|---|---|
| Button | Actions | variant, loading, icon, iconPosition |
| TextInput | Single-line text | value, onValueChange, error, errorMessage |
| NumberInput | Numeric input | enableStepper, step, min, max |
| Textarea | Multi-line text | autoHeight |
| Switch | Toggle | checked, onChange |
| Select | Dropdown (+ SelectItem) | enableClear, requires <SelectItem> children |
| MultiSelect | Multi-select (+ MultiSelectItem) | placeholderSearch |
| SearchSelect | Searchable select (+ SearchSelectItem) | searchValue, onSearchValueChange |
| DatePicker | Date selection | minDate, maxDate, locale, weekStartsOn |
| DateRangePicker | Date range (+ DateRangePickerItem) | enableSelect, custom presets |
| TabGroup | Tab navigation | index, onIndexChange, use with TabList/TabPanels |
All inputs support: error, errorMessage, disabled, placeholder
Typography components.
| Component | Purpose | Props |
|---|---|---|
| Title | Main heading | color |
| Subtitle | Secondary heading | color |
| Text | Body text | color |
| Metric | Large numbers/KPIs | color |
| Bold / Italic | Text styling wrappers | - |
| Callout | Highlighted notice | title (required), icon, color |
| Legend | Chart legend | categories, colors, onClickLegendItem, enableLegendSlider |
Visual indicators and badges.
| Component | Purpose | Key Props |
|---|---|---|
| Icon | Icon wrapper | icon (required), variant, size, color |
| Badge | Status labels | color, size, icon |
| BadgeDelta | Change indicators | deltaType, isIncreasePositive |
Tables and lists with semantic HTML.
| Component | Purpose |
|---|---|
| List / ListItem | Vertical lists with dividers |
| Table / TableHead / TableBody / TableFoot | Data tables |
| TableRow / TableHeaderCell / TableCell / TableFooterCell | Table structure |
Color Palette: 22 theme colors supporting light/dark modes
Sizing: xs | sm | md | lg | xl
Theme: Automatic light/dark mode via Tailwind
Complete Type Definitions | Common Props Reference
<div className="p-6 space-y-6">
<Flex justifyContent="between" alignItems="center">
<Title>Dashboard</Title>
<Button>Export</Button>
</Flex>
<Grid numItems={1} numItemsSm={2} numItemsLg={4} className="gap-6">
<Card decoration="left" decorationColor="blue">
<Text>Revenue</Text>
<Metric>$45,231</Metric>
<BadgeDelta deltaType="increase">+12%</BadgeDelta>
</Card>
{/* More cards... */}
</Grid>
</div>const [value, setValue] = useState('');
const [error, setError] = useState('');
<TextInput
value={value}
onValueChange={(v) => {
setValue(v);
setError(v ? '' : 'Required');
}}
error={!!error}
errorMessage={error}
/>const [selected, setSelected] = useState<string | null>(null);
<BarChart
data={data}
index="date"
categories={['revenue']}
onValueChange={(v) => setSelected(v?.categoryClicked || null)}
/>value/onChange (controlled) or defaultValue (uncontrolled)SelectItem children for Select componentnull in chart onValueChangeindex prop on charts (required)enableClear for Select when clearing is neededimport { type Color, type Size, type ValueFormatter } from '@tremor/react';
// Type-safe props
const chartColor: Color = 'blue'; // ✓
const customFormatter: ValueFormatter = (v) => `$${v}`; // ✓startEndOnly for charts with many data pointsshowAnimation: false (default) for better performanceReact.memo for metric cards that don't change frequently