Skip to main content

Dashboard

A composable dashboard block with stats grid, charts section, and data table. Perfect for admin dashboards and analytics overviews.

Installation

$ npx shadcn@latest add @orecus/dashboard
Registry:
@orecus/header@orecus/stat-card@orecus/chart@orecus/card@orecus/entity-table

Component

Dashboard Block

Dashboard

Overview of your store performance

Total Revenue

This Month

vs last month

Active Users

This Month

vs last month

Orders

This Month

vs last month

Revenue Overview

Monthly revenue trend

Sales by Category

Distribution across categories

Recent Orders

Latest customer orders

CustomerProductAmountStatusDate
John DoeMacBook Pro 16"$2,499completed2024-01-15
Jane SmithiPhone 15 Pro$1,199completed2024-01-15
Bob JohnsonAirPods Pro$249pending2024-01-14
Alice BrowniPad Air$799completed2024-01-14
Charlie WilsonApple Watch$399cancelled2024-01-13

Minimal Dashboard

Quick Stats

Key metrics at a glance

Revenue

Today

Visitors

Today

Orders

Today

Props

PropTypeDefaultDescription
children*ReactNodeDashboard compound components (Dashboard.Header, Dashboard.Stats, etc.)
classNamestringAdditional CSS classes for the container

Compound Components

Dashboard.Header

Header with title, description, and actions. Extends Header component props.

PropTypeDefaultDescription
titlestringHeader title
descriptionstringHeader description
iconLucideIconHeader icon
actionsReactNodeActions to display on the right side
classNamestringAdditional CSS classes

Dashboard.Stats

Grid of stat cards with configurable columns.

PropTypeDefaultDescription
children*ReactNodeStat cards to display
columns2 | 3 | 44Number of grid columns
classNamestringAdditional CSS classes

Dashboard.Charts

Charts section with single, split, or triple layout.

PropTypeDefaultDescription
children*ReactNodeChart components to display
layout'single' | 'split' | 'triple''split'Layout mode
classNamestringAdditional CSS classes

Dashboard.Table

Data table or grid section.

PropTypeDefaultDescription
children*ReactNodeTable or grid content
classNamestringAdditional CSS classes

Dashboard.Section

Custom section with optional title and actions.

PropTypeDefaultDescription
children*ReactNodeSection content
titlestringSection title
descriptionstringSection description
actionsReactNodeActions for the section header
classNamestringAdditional CSS classes