Create distinctive, production-grade frontend components for the finance dashboard. Generates polished, accessible UI with shadcn/ui, Tailwind CSS v4, and Recharts that avoids generic AI aesthetics. Use when building pages, components, charts, or layouts.
Create distinctive, production-grade frontend components for the finance dashboard. Generates polished, accessible UI with shadcn/ui, Tailwind CSS v4, and Recharts that avoids generic AI aesthetics. Use when building pages, components, charts, or layouts.
argument-hint
<component-or-page description e.g. "portfolio metric cards" or "Fear & Greed gauge">
Frontend Design: $ARGUMENTS
You are a senior frontend engineer and visual designer building UI for the Finance Dashboard — a personal investment tracking tool for a self-directed investor managing VOO, QQQ, and Bitcoin from Costa Rica.
Context
Read these files first:
@CLAUDE.md — project conventions, tech stack, and colocated architecture
@PDD.md — product design document, Section 6 (Visual Design) for layout wireframes, component system, chart specs, and theming
Design Thinking
Before writing any code, commit to a clear aesthetic direction for this component:
Purpose: What problem does this interface solve? What data does it surface? Who looks at it and when?
Tone: This is a finance dashboard — the aesthetic must balance professional confidence with modern clarity. Think Bloomberg Terminal meets Linear app: data-dense but breathable, dark-first but not gloomy.
Differentiation: What makes this component feel purpose-built for a VOO/QQQ/BTC investor rather than a generic dashboard template?
Hierarchy: What's the single most important piece of information? Design that element first — size, color, and position should make it unmissable.
Tech Stack Constraints
Layer
Technology
Usage
Styling
Tailwind CSS v4
Utility classes only — no custom CSS files, no @apply
Components
shadcn/ui
Use existing primitives first — Card, Table, Badge, Button, Dialog, Sheet, Skeleton, Toast, Alert, Tabs, Form, Input, Select, Separator, Tooltip
Server Components by default. 'use client' only when needed (forms, charts, interactive elements)
Motion
Tailwind animate-* + transition-*
CSS-only animations. Use framer-motion only if already installed
CRITICAL: All components MUST use shadcn/ui + Tailwind classes. Never generate raw HTML/CSS or introduce new CSS frameworks.
Design System: Finance Dashboard
Dark Mode
The dashboard uses next-themes for dark/light/system theme switching:
Default theme: dark — finance dashboards are dark-first
Provider: ThemeProvider from next-themes wraps the app in app/layout.tsx
Toggle: Use the ThemeToggle component (app/dashboard/_components/theme-toggle.tsx) in the sidebar or header
CSS cascade: In globals.css, :root (light) MUST come before .dark — equal specificity means last-in-source wins
CSS strategy: Tailwind CSS v4 @custom-variant dark (&:is(.dark *)) — the .dark class on <html> activates dark variables
suppressHydrationWarning: Required on <html> to prevent hydration mismatch from theme script
When building components, always test in both themes. Use semantic CSS variables (bg-background, text-foreground, bg-card, etc.) rather than hardcoded colors. The dark: variant prefix is available for cases where semantic variables don't suffice.
Color Palette
Use Tailwind's CSS variable system. These are the semantic colors for this project:
NEVER use generic purple-on-white gradients, random rainbow palettes, or evenly distributed color schemes. Commit to the palette above for financial data. Use sharp accent colors against dark surfaces.
Typography
Use the font stack configured in Tailwind. Prioritize:
Tabular numbers for financial data: font-variant-numeric: tabular-nums via tabular-nums class
Monospace for prices and quantities: font-mono — prices should always align vertically
Size hierarchy: Display numbers (portfolio total) at text-4xl+, section headers at text-xl, body at text-sm, labels at text-xs text-muted-foreground
Weight contrast: Bold (font-semibold) for values, regular weight for labels. Never use medium-on-medium.
Metric Cards
The primary data display pattern. Every metric card follows this structure:
CRITICAL: Skeletons must match the final content dimensions. A metric card skeleton must look like a metric card. A table skeleton must have the same number of columns.
Never center-align a dashboard page. Left-aligned with generous right margin.
Responsive Strategy
Breakpoint
Grid
Cards
Charts
Sidebar
< 768px
1 col
Stack
Full width, h-[200px]
Hamburger overlay
768px–1024px
2 col
2-up
Side by side, h-[250px]
Visible, narrow
> 1024px
3-4 col
4-up
Optimal ratio, h-[300px]
Full 240px
Motion & Micro-interactions
Use CSS-only animations via Tailwind:
Page load: Cards fade in with animate-in fade-in-0 slide-in-from-bottom-2 (use animation-delay for stagger)
Hover on cards: transition-shadow hover:shadow-md — subtle lift
Price changes: Flash green/red briefly on update with a transition-colors duration-300
Loading: animate-pulse on Skeleton components (built-in to shadcn/ui)
Notification bell: animate-bounce when new notifications arrive, then stop
Chart tooltips: transition-opacity duration-150 for smooth show/hide
DO NOT add heavy page transitions, parallax scrolling, or particle effects. This is a data-dense finance tool — motion should be informational (price changed, data loaded) not decorative.
Backgrounds & Visual Depth
Dark mode (default): bg-background (zinc-950) for page, bg-card (zinc-900) for cards
Light mode: bg-background (white) for page, bg-card (white) with border for cards
Depth hierarchy: Page → Card → Popover/Dialog. Each level slightly lighter in dark mode.
Subtle texture: Cards use border not shadow in dark mode. Shadows are for light mode and elevated elements (dialogs, dropdowns).
Theme-aware styling: Use dark: prefix for theme-specific overrides (e.g., shadow-sm dark:shadow-none). Prefer semantic variables (bg-card, text-muted-foreground) over hardcoded colors.
NO gradient backgrounds on the main dashboard. Gradients are reserved for chart fills and the occasional CTA button.
Anti-Patterns — NEVER Do These
Generic AI slop: Purple gradients, Inter font, centered hero sections, generic dashboards
Overbuilt markup: A metric card should be ~15 lines of JSX, not 50
Inconsistent numbers: Mixing $1,234 and $1234.00 and 1234 formats on the same page
Color soup: More than 4 distinct hues on one page (asset colors + semantic colors is the limit)