This UI Kit provides a comprehensive set of reusable components and design tokens for the Financial Dashboard application. It's built on top of Tailwind CSS v4 and follows modern design principles with full dark mode support.
- Primary 50:
#eff6ff- Lightest blue - Primary 500:
#3b82f6- Main brand color - Primary 600:
#2563eb- Primary button hover - Primary 700:
#1d4ed8- Primary button active
- Gray 50:
#f9fafb- Background light - Gray 100:
#f3f4f6- Card backgrounds - Gray 500:
#6b7280- Text secondary - Gray 900:
#111827- Text primary
The UI Kit uses Inter as the primary font family with the following scale:
- Text XS: 12px (0.75rem)
- Text SM: 14px (0.875rem)
- Text Base: 16px (1rem)
- Text LG: 18px (1.125rem)
- Text XL: 20px (1.25rem)
Following Tailwind's 4px base unit system:
- 1: 4px
- 2: 8px
- 4: 16px
- 6: 24px
- 8: 32px
A versatile button component with multiple variants and sizes.
import { Button } from '@/ui';
// Basic usage
<Button>Click me</Button>
// With variants
<Button variant="primary">Primary</Button>
<Button variant="secondary">Secondary</Button>
<Button variant="outline">Outline</Button>
<Button variant="ghost">Ghost</Button>
<Button variant="danger">Danger</Button>
// With sizes
<Button size="sm">Small</Button>
<Button size="md">Medium</Button>
<Button size="lg">Large</Button>
// With loading state
<Button loading>Loading...</Button>
// With icons
<Button leftIcon={<Plus />}>Add Item</Button>
<Button rightIcon={<ArrowRight />}>Continue</Button>Container component for grouping related content.
import { Card, CardHeader, CardContent, CardFooter } from '@/ui';
<Card>
<CardHeader>
<h3>Card Title</h3>
</CardHeader>
<CardContent>
<p>Card content goes here</p>
</CardContent>
<CardFooter>
<Button>Action</Button>
</CardFooter>
</Card>
// Variants
<Card variant="outlined">Outlined card</Card>
<Card variant="elevated">Elevated card</Card>Form input component with label, error states, and icons.
import { Input } from '@/ui';
import { Search, Mail } from 'lucide-react';
<Input
label="Email"
placeholder="Enter your email"
type="email"
/>
// With icons
<Input
leftIcon={<Search />}
placeholder="Search..."
/>
// With error state
<Input
label="Password"
error="Password is required"
type="password"
/>Small status indicators and labels.
import { Badge } from '@/ui';
<Badge>Default</Badge>
<Badge variant="success">Success</Badge>
<Badge variant="warning">Warning</Badge>
<Badge variant="danger">Danger</Badge>
<Badge variant="info">Info</Badge>User profile pictures with fallback support.
import { Avatar } from '@/ui';
<Avatar src="/user.jpg" alt="User" />
<Avatar fallback="JD" />
<Avatar size="lg" />Contextual menus and dropdowns.
import { Dropdown, DropdownItem, DropdownSeparator } from "@/ui";
import { Settings, User, LogOut } from "lucide-react";
<Dropdown trigger={<Button>Menu</Button>} align="right">
<DropdownItem icon={<User />}>Profile</DropdownItem>
<DropdownItem icon={<Settings />}>Settings</DropdownItem>
<DropdownSeparator />
<DropdownItem icon={<LogOut />} destructive>
Logout
</DropdownItem>
</Dropdown>;Dialog overlays for important actions.
import { Modal } from "@/ui";
<Modal
isOpen={isOpen}
onClose={() => setIsOpen(false)}
title="Confirm Action"
size="md"
>
<p>Are you sure you want to continue?</p>
</Modal>;Navigation between related content.
import { Tabs, TabsList, TabsTrigger, TabsContent } from "@/ui";
<Tabs defaultValue="overview">
<TabsList>
<TabsTrigger value="overview">Overview</TabsTrigger>
<TabsTrigger value="analytics">Analytics</TabsTrigger>
</TabsList>
<TabsContent value="overview">Overview content</TabsContent>
<TabsContent value="analytics">Analytics content</TabsContent>
</Tabs>;Important messages and notifications.
import { Alert } from '@/ui';
<Alert variant="success" title="Success">
Your changes have been saved.
</Alert>
<Alert variant="danger" dismissible onDismiss={() => {}}>
Something went wrong.
</Alert>All components support dark mode automatically through Tailwind's dark mode classes. The theme can be toggled using the existing DarkModeContext.
- All interactive components support keyboard navigation
- Proper ARIA labels and roles are implemented
- Color contrast meets WCAG AA standards
- Focus indicators are clearly visible
- Consistency: Use the design tokens (colors, spacing, typography) consistently across the application
- Responsive Design: All components are mobile-first and responsive
- Performance: Components are optimized for performance with proper React patterns
- Accessibility: Always include proper labels and ARIA attributes
- Testing: Components are designed to be easily testable
To migrate existing components to use the new UI Kit:
- Replace custom styled components with UI Kit components
- Update color classes to use the new primary color palette
- Ensure proper spacing using the design system tokens
- Test dark mode functionality
- Verify accessibility compliance