React Dashboard Component Builder
Generate a complete analytics dashboard with charts, KPI cards, data tables, and filters using React and Recharts.
The Prompt
Build a React analytics dashboard for this use case: Dashboard name: [name] Industry/purpose: [e.g., SaaS metrics, e-commerce analytics, marketing performance] Key metrics to show: [list 4–6 KPIs with names and data types] Chart types needed: [line chart, bar chart, pie chart, area chart — list which] Data source: [mock data for now / REST API endpoint: specify] Date range filter: [yes/no] Tech stack: React + TypeScript + Tailwind CSS + Recharts Build these components: 1. Dashboard layout: - Sidebar navigation - Header with date range picker and user avatar 2. KPI cards row (4 cards): - Metric value with trend arrow - Percentage change vs previous period - Mini sparkline chart 3. Main chart section: - Primary chart (line/area) with legend and tooltips - Secondary chart (bar) side by side 4. Data table: - Sortable columns - Pagination (10 rows per page) - Export to CSV button - Row hover highlight 5. Mock data generator function that produces realistic sample data Use Tailwind for all styling. Make it dark theme by default.
Tips for Best Results
- →Add loading skeleton states for each component while data fetches
- →Use React.memo on chart components to prevent unnecessary re-renders
Tags
Related Prompts
Full-Stack API Generator
Generate a complete REST API with database schema, authentication, CRUD operations, and documentation.
Code GenerationDatabase Schema Designer
Design a complete database schema with tables, relationships, indexes, and migration scripts for your application.
Code GenerationREST API Builder with Authentication
Generate a complete, production-ready REST API with JWT authentication, rate limiting, and full CRUD endpoints.
Code GenerationPython Web Scraper Builder
Generate a robust Python web scraper with error handling, rate limiting, and data export to CSV or JSON.
Code GenerationSQL Query Optimizer and Explainer
Paste any SQL query and get an optimized version with explanation of what was improved and why.
Code GenerationChrome Extension Builder
Build a functional Chrome extension with popup UI, content scripts, and background service worker from a single prompt.