Build a React Dashboard with Tremor

Create professional, data-driven dashboards with 35+ accessible React components built on Tailwind CSS and Radix UI

What is Tremor?

Tremor is an open-source React library that provides over 35 customizable, accessible components specifically designed for building dashboards and data-driven web applications. Originally developed by Tremor Labs and recently acquired by Vercel, Tremor has become a go-to solution for developers who need to create professional dashboards quickly without sacrificing quality or design consistency.

The library is built on two powerful foundations: Tailwind CSS for styling and Radix UI for accessibility. This means every Tremor component is not only visually appealing but also fully accessible out of the box, following WAI-ARIA guidelines and supporting keyboard navigation, screen readers, and other assistive technologies.

Tremor's component library covers everything you need for a complete dashboard:

  • Charts and Visualizations: Area charts, bar charts, line charts, donut charts, progress bars, and trackers
  • Layout Components: Cards, grids, and containers for organizing your dashboard content
  • Data Display: Metrics, badges, tables, and lists for presenting key information at a glance
  • Interactive Elements: Date range pickers, tabs, accordions, and filters for user interaction

The key philosophy behind Tremor is providing components that look great out of the box while remaining fully customizable. Each component accepts standard React props along with Tailwind CSS classes, giving you complete control over the final appearance while maintaining a consistent design language throughout your application.

Why Use Tremor for Dashboards?

Dashboards present unique challenges in web development. They need to display large amounts of data clearly, support various screen sizes, maintain consistent styling across many different component types, and remain accessible to all users. Building these features from scratch would require significant time and expertise in data visualization, responsive design, and accessibility.

Tremor addresses all these challenges by providing pre-built components that have been tested and refined to meet professional standards. The library's components work together seamlessly, sharing consistent color palettes, spacing, typography, and interaction patterns. This consistency is crucial for creating dashboards that feel cohesive and professional.

For teams building custom web applications, Tremor accelerates development while ensuring your dashboard meets modern standards for performance and accessibility. When combined with AI automation services, you can create intelligent dashboards that surface actionable insights from your data.

Installation and Setup

Setting up Tremor in a React project involves a few straightforward steps. Whether you're starting a new project or adding Tremor to an existing application, the process is well-documented and reliable.

Prerequisites

React 18.2.0+

Tremor requires React version 18.2.0 or higher for full compatibility

Tailwind CSS 3.0+

Tailwind CSS version 3.0 or higher for styling foundation

Node.js & npm

Package manager for installing Tremor and its dependencies

Installing Tremor Dependencies
1# Install Tremor and required peer dependencies2npm install @tremor/react @headlessui/react @heroicons/react3 4# For Tailwind CSS v4, ensure you're using the new CSS-first configuration5# No traditional tailwind.config.js required in v4

For Tailwind CSS v3 users, you'll need to update your tailwind.config.js to include Tremor's component paths. This ensures Tailwind can generate the correct utility classes for Tremor's components.

Tailwind Configuration for Tremor
1// tailwind.config.js for Tailwind CSS v32/** @type {import('tailwindcss').Config} */3export default {4 content: [5 "./index.html",6 "./src/**/*.{js,ts,jsx,tsx}",7 "./node_modules/@tremor/**/*.{js,ts,jsx,tsx}",8 ],9 theme: {10 extend: {},11 },12 plugins: [],13}

Core Dashboard Components

Tremor's component library is extensive, but understanding the core building blocks will enable you to create virtually any dashboard design. Let's explore the essential components you'll use most frequently.

Cards and Layout Components

Cards are the fundamental building block of most dashboards. They provide containers for individual pieces of content, creating visual separation while maintaining a consistent look and feel. Tremor's Card component is highly flexible, supporting decorations, headers, and footers.

Tremor Card Component Example
1import { Card, Title, Text, Metric } from "@tremor/react";2 3function DashboardCard() {4 return (5 <Card className="max-w-xs" decoration="top" decorationColor="indigo">6 <Title>Sales Overview</Title>7 <Text>Monthly revenue breakdown</Text>8 <Metric>$72,234</Metric>9 </Card>10 );11}

Metric Components

Metrics are specialized components for displaying key performance indicators and other important numbers. They combine a large, prominent number with optional labels and trend indicators.

Metric Component with Delta
1import { Metric, Delta } from "@tremor/react";2 3function KPIComponent() {4 return (5 <div>6 <Metric>12,345</Metric>7 <Delta deltaType="moderateIncrease">+12.3%</Delta>8 </div>9 );10}

Chart Components

Tremor provides four primary chart types that cover most data visualization needs: DonutChart for part-to-whole relationships, AreaChart for trends over time, BarChart for comparisons, and LineChart for continuous data series. All charts share a consistent API for configuration and styling.

Learn more about building data-driven applications with our web development services and discover how visualization libraries like Tremor enhance business intelligence dashboards.

DonutChart

The DonutChart renders categorical data as ring-shaped visualizations with optional center labels. Ideal for displaying distribution data like market share, traffic sources, or category breakdowns.

DonutChart Implementation
1import { DonutChart } from "@tremor/react";2 3const chartData = [4 { name: "Direct", value: 4520 },5 { name: "Social", value: 2340 },6 { name: "Organic", value: 3200 },7 { name: "Referral", value: 980 },8];9 10function TrafficSourceChart() {11 return (12 <DonutChart13 className="mt-6"14 data={chartData}15 category="value"16 index="name"17 colors={["blue", "cyan", "indigo", "violet"]}18 valueFormatter={(value) => `${value} visitors`}19 />20 );21}

AreaChart

AreaChart displays quantitative data as filled regions between lines and the x-axis, making it ideal for showing cumulative trends or stacked data series over time.

AreaChart for Trend Visualization
1import { AreaChart } from "@tremor/react";2 3const chartData = [4 { date: "Jan", Revenue: 2890, Expenses: 2338 },5 { date: "Feb", Revenue: 2756, Expenses: 2103 },6 { date: "Mar", Revenue: 3322, Expenses: 2194 },7 { date: "Apr", Revenue: 3470, Expenses: 2108 },8];9 10function RevenueChart() {11 return (12 <AreaChart13 className="h-72 mt-6"14 data={chartData}15 index="date"16 categories={["Revenue", "Expenses"]}17 colors={["indigo", "rose"]}18 valueFormatter={(value) => `$${value}`}19 />20 );21}

BarChart

BarChart presents categorical data as rectangular bars with lengths proportional to their values. Tremor supports both horizontal and vertical bar charts with stacked and grouped configurations.

BarChart for Category Comparisons
1import { BarChart } from "@tremor/react";2 3const chartData = [4 { name: "Q1", Sales: 12500, Profit: 4200 },5 { name: "Q2", Sales: 15800, Profit: 5800 },6 { name: "Q3", Sales: 14200, Profit: 5100 },7 { name: "Q4", Sales: 18500, Profit: 7200 },8];9 10function QuarterlyChart() {11 return (12 <BarChart13 className="h-72 mt-6"14 data={chartData}15 index="name"16 categories={["Sales", "Profit"]}17 colors={["blue", "emerald"]}18 valueFormatter={(value) => `$${value.toLocaleString()}`}19 />20 );21}

LineChart

LineChart displays information as a series of data points connected by straight line segments, perfect for showing continuous data like time series, stock prices, or temperature readings.

LineChart for Continuous Data
1import { LineChart } from "@tremor/react";2 3const chartData = [4 { date: "00:00", Humidity: 78, Temperature: 22 },5 { date: "04:00", Humidity: 82, Temperature: 19 },6 { date: "08:00", Humidity: 75, Temperature: 21 },7 { date: "12:00", Humidity: 65, Temperature: 26 },8 { date: "16:00", Humidity: 62, Temperature: 28 },9];10 11function SensorChart() {12 return (13 <LineChart14 className="h-72 mt-6"15 data={chartData}16 index="date"17 categories={["Humidity", "Temperature"]}18 colors={["cyan", "rose"]}19 valueFormatter={(value) => `${value}${value === 82 || value === 78 || value === 75 || value === 65 || value === 62 ? "%" : "°C"}`}20 />21 );22}

Table Component

For displaying tabular data, Tremor's Table component provides a clean, accessible solution with built-in support for sorting, pagination, and responsive layouts.

Tremor Table Component
1import { Table, TableHead, TableRow, TableHeaderCell, TableBody, TableCell, Text } from "@tremor/react";2 3const items = [4 { id: 1, name: "Enterprise Plan", price: "$499/mo", users: "Unlimited" },5 { id: 2, name: "Professional", price: "$99/mo", users: "Up to 50" },6 { id: 3, name: "Starter", price: "$29/mo", users: "Up to 10" },7];8 9function PricingTable() {10 return (11 <Table className="mt-6">12 <TableHead>13 <TableRow>14 <TableHeaderCell>Plan</TableHeaderCell>15 <TableHeaderCell>Price</TableHeaderCell>16 <TableHeaderCell>Users</TableHeaderCell>17 </TableRow>18 </TableHead>19 <TableBody>20 {items.map((item) => (21 <TableRow key={item.id}>22 <TableCell>{item.name}</TableCell>23 <TableCell>{item.price}</TableCell>24 <TableCell>{item.users}</TableCell>25 </TableRow>26 ))}27 </TableBody>28 </Table>29 );30}

Building Complete Dashboard Layouts

Effective dashboards balance information density with visual clarity. Tremor's components work together to create professional layouts that guide users through key metrics. The grid system enables responsive arrangements that adapt to different screen sizes.

Complete Dashboard Layout Example
1import { Grid, Col, Card, Title, AreaChart, DonutChart, Metric, Text, Delta } from "@tremor/react";2 3const kpiData = [4 { title: "Total Revenue", metric: "$456,000", delta: "+12.3%", deltaType: "moderateIncrease" },5 { title: "Active Users", metric: "23,456", delta: "+8.1%", deltaType: "increase" },6 { title: "Conversion Rate", metric: "3.2%", delta: "-0.4%", deltaType: "moderateDecrease" },7];8 9function DashboardLayout() {10 return (11 <main className="p-6">12 <Title>Executive Dashboard</Title>13 <Text>Last updated: January 2025</Text>14 15 {/* KPI Grid */}16 <Grid numItems={1} numItemsSm={2} numItemsLg={3} className="gap-6 mt-6">17 {kpiData.map((item) => (18 <Card key={item.title} decoration="top" decorationColor="indigo">19 <Text>{item.title}</Text>20 <Metric>{item.metric}</Metric>21 <Delta deltaType={item.deltaType}>{item.delta}</Delta>22 </Card>23 ))}24 </Grid>25 26 {/* Charts Grid */}27 <Grid numItems={1} numItemsLg={2} className="gap-6 mt-6">28 <Card>29 <Title>Revenue Trend</Title>30 <AreaChart className="h-72 mt-4" {...chartProps} />31 </Card>32 <Card>33 <Title>Sales by Region</Title>34 <DonutChart className="h-72 mt-4" {...donutProps} />35 </Card>36 </Grid>37 </main>38 );39}

Advanced Chart Configuration

Tremor's charts offer extensive customization options for colors, tooltips, animations, and data formatting. Understanding these configuration options enables you to create polished, professional visualizations that match your brand identity.

Value Formatters

The valueFormatter prop on all chart components enables precise control over how numerical values display. This is essential for presenting currency, percentages, and large numbers in readable formats.

Value Formatter Utilities
1const valueFormatters = {2 currency: (value: number) =>3 new Intl.NumberFormat("en-US", {4 style: "currency",5 currency: "USD",6 maximumFractionDigits: 0,7 }).format(value),8 9 compact: (value: number) =>10 new Intl.NumberFormat("en-US", {11 notation: "compact",12 compactDisplay: "short",13 }).format(value),14 15 percentage: (value: number) => `${value.toFixed(1)}%`,16 17 decimal: (value: number) => value.toFixed(2),18};

Best Practices

Creating effective dashboards requires more than just arranging components. Following established design principles will help ensure your dashboards are both beautiful and functional.

Dashboard Best Practices

Choose the right chart type

Match your visualization to your data pattern. Use line charts for trends, bar charts for comparisons, and donut charts for distributions.

Keep color consistent

Assign consistent colors to the same categories across different charts to reduce cognitive load.

Use value formatters

Always format numbers appropriately for your domain (currency, percentages, file sizes).

Add context with deltas

Include percentage or absolute change indicators on metrics to provide temporal context.

Group related content

Use Cards and Grid components to visually group related metrics and charts.

Design for responsiveness

Use Grid's numItems props to create adaptive layouts for different screen sizes.

Combine with Remix Icons

Tremor pairs well with the Remix Icon library for consistent iconography.

Conclusion

Tremor provides a comprehensive toolkit for building professional React dashboards. Its component-based architecture, consistent design language, and accessibility-focused implementation make it an excellent choice for projects ranging from startup MVPs to enterprise-scale analytics platforms.

By following the installation steps and component patterns outlined in this guide, you can accelerate your dashboard development while maintaining code quality and user experience standards. The combination of Tremor with Tailwind CSS and Radix UI creates a powerful foundation for data-driven applications.

If you're building a custom analytics platform or business intelligence tool, our web development team has extensive experience creating data-intensive applications using modern React component libraries and visualization frameworks. For organizations looking to integrate AI-powered insights into their dashboards, our AI automation services can help you build intelligent systems that transform raw data into actionable business intelligence.

Ready to Build Your Dashboard?

Our team specializes in creating professional React applications with modern component libraries and data visualization solutions.

Sources

  1. Tremor GitHub Repository - Official open-source repository with 35+ React components for dashboards
  2. Tremor Documentation - Installation - Complete installation guide
  3. Refine Blog - Building React Admin Dashboard with Tremor - Comprehensive tutorial
  4. Space Jelly - Build Data Dashboards in React with Tremor - Step-by-step tutorial
  5. Tremor.so Official Site - Primary source for Tremor components and documentation
  6. Remix Icon - Icon set used by Tremor