← Back to Data Visualization

Modular dashboard components designed to display key information at a glance. Each widget is self-contained and can be combined to create comprehensive dashboards.

MetricStatusChartProgressFeedAction

TOTAL REVENUE

$124,350
+8.2%

ACTIVE USERS

2,847
+12.5%

CONVERSION

3.24%
-2.1%

ORDERS TODAY

156
+5.7%

WEEKLY TRENDS

M
T
W
T
F
S
S

SYSTEM STATUS

API
Database
Storage

MONTHLY GOAL

68%
$27,200 of $40,000

KPI Card

Display single key performance indicators with trends

metric

Revenue KPI

MONTHLY REVENUE

$42,850
+12.5%vs last month

const KPICard = ({ title, value, change, changeType, icon: Icon }) => (
  <div className="kpi-card border shadow-sm bg-card p-4">
    <div className="kpi-header">
      <h4 className="kpi-title">{title}</h4>
      <Icon className="kpi-icon" />
    </div>
    <div className="kpi-value">{value}</div>
    <div className="kpi-change">
      {changeType === 'positive' ? <TrendingUp /> : <TrendingDown />}
      <span className={changeType === 'positive' ? 'positive' : 'negative'}>
        {change}
      </span>
    </div>
  </div>
)

Status Indicator

Show system health, alerts, and operational status

status

System Health

SYSTEM STATUS

HEALTHY
API Response
Database
Storage

const StatusIndicator = ({ title, services, overallStatus }) => (
  <div className="status-widget border shadow-sm bg-card p-4">
    <div className="status-header">
      <h4>{title}</h4>
      <div className="status-badge">
        <div className={`status-dot ${overallStatus}`} />
        <span>{overallStatus.toUpperCase()}</span>
      </div>
    </div>
    <div className="services-list">
      {services.map(service => (
        <div key={service.name} className="service-item">
          <span>{service.name}</span>
          {service.status === 'healthy' ? <CheckCircle /> : <AlertCircle />}
        </div>
      ))}
    </div>
  </div>
)

Mini Chart

Compact charts for trending data and sparklines

chart

Trend Sparkline

DAILY VISITORS

Last 7 days
2,847

const MiniChart = ({ title, data, currentValue, timeframe }) => (
  <div className="mini-chart-widget border shadow-sm bg-card p-4">
    <div className="chart-header">
      <h4>{title}</h4>
      <span className="timeframe">{timeframe}</span>
    </div>
    <div className="sparkline">
      {data.map((value, index) => (
        <div 
          key={index}
          className="bar"
          style={{ height: `${(value / Math.max(...data)) * 100}%` }}
        />
      ))}
    </div>
    <div className="current-value">{currentValue}</div>
  </div>
)

Progress Tracker

Track goals, progress, and completion rates

progress

Goal Progress

MONTHLY GOAL

75% complete
$30,000 of $40,0005 days left

const ProgressTracker = ({ title, current, target, deadline, percentage }) => (
  <div className="progress-widget border shadow-sm bg-card p-4">
    <div className="progress-header">
      <h4>{title}</h4>
      <span className="completion-rate">{percentage}% complete</span>
    </div>
    <div className="progress-bar-container">
      <div className="progress-bar" style={{ width: `${percentage}%` }} />
    </div>
    <div className="progress-details">
      <span>{`${current} of ${target}`}</span>
      <span className="deadline">{deadline}</span>
    </div>
  </div>
)

Activity Feed

Display recent events, notifications, and updates

feed

Recent Activity

RECENT ACTIVITY

New user registered
2 minutes ago
Payment received
5 minutes ago
Server maintenance
1 hour ago

const ActivityFeed = ({ title, activities, maxItems = 5 }) => (
  <div className="activity-feed border shadow-sm bg-card p-4">
    <h4 className="feed-title">{title}</h4>
    <div className="activities-list">
      {activities.slice(0, maxItems).map(activity => (
        <div key={activity.id} className="activity-item">
          <div className={`activity-dot ${activity.type}`} />
          <div className="activity-content">
            <div className="activity-message">{activity.message}</div>
            <div className="activity-time">{activity.timestamp}</div>
          </div>
        </div>
      ))}
    </div>
  </div>
)

Quick Actions

Provide shortcuts to common tasks and operations

action

Admin Actions

QUICK ACTIONS


const QuickActions = ({ title, actions }) => (
  <div className="quick-actions border shadow-sm bg-card p-4">
    <h4 className="actions-title">{title}</h4>
    <div className="actions-grid">
      {actions.map(action => (
        <button
          key={action.id}
          onClick={action.onClick}
          className={`action-button ${action.variant}`}
        >
          {action.icon && <action.icon />}
          {action.label}
        </button>
      ))}
    </div>
  </div>
)

Widget Hierarchy

  • Top row: Most important KPIs and metrics
  • Second section: Trend charts and comparisons
  • Lower sections: Detailed data and secondary metrics
  • Sidebar: Status indicators and quick actions
  • Footer: Activity feeds and recent updates

Responsive Design

  • • Use CSS Grid for flexible layouts
  • • Stack widgets vertically on mobile
  • • Maintain consistent spacing (16px/24px)
  • • Ensure touch-friendly interactions
  • • Test on various screen sizes

Data Loading

  • • Load critical widgets first
  • • Use skeleton screens while loading
  • • Implement progressive enhancement
  • • Cache frequently accessed data
  • • Use real-time updates sparingly

User Experience

  • • Allow widget customization
  • • Provide drag-and-drop reordering
  • • Enable drill-down capabilities
  • • Show data sources and timestamps
  • • Include export functionality

Accessibility

  • • Use semantic HTML structure
  • • Provide ARIA labels for charts
  • • Ensure keyboard navigation
  • • Meet color contrast requirements
  • • Support screen readers