This document describes the UI components and styling guidelines for the dashboard application. All components follow a flat design aesthetic with long shadows and rounded corners. The UI Kit includes themed components that adapt to light/dark modes and customizable color schemes.
- Flat Design 2.0: Using long shadows and clean lines for a modern look
- Consistent Spacing: Using Tailwind's spacing scale for consistent margins and padding
- Rounded Corners: All interactive elements have rounded corners (rounded-xl to rounded-2xl)
- Limited Color Palette: Primary purple (#8A89F0) with grayscale for backgrounds and text
- Themed Components: All components support light/dark themes and customizable color schemes
| Color Name | Hex Value | Usage |
|---|---|---|
| Primary | #8A89F0 | Main buttons, links, accents |
| Secondary | #6d6cb5 | Hover states, secondary elements |
| Light Gray | gray-200 | Borders, light backgrounds |
| Dark Gray | gray-700 | Text, dark backgrounds |
Using the Inter font family throughout the application:
- Headings: Bold weights (700)
- Subheadings: Semi-bold weights (600)
- Body text: Regular weights (400)
The application includes a comprehensive theme system that allows customization of:
- Background colors
- Primary colors
- Positive colors (for success states)
- Negative colors (for error states)
- Support for both light and dark modes
Multiple button styles are used throughout the application:
-
Primary Gradient Button:
- Used for main actions like signing in or creating dashboards
- Features a gradient from #8A89F0 to #A2C0F5
- Has long shadow effect with flat-btn-shadow class
- Large padding (py-4) and rounded-2xl corners
- Hover effect with scale transformation
-
Secondary Text Buttons:
- Used for alternative actions like "Continue as Guest"
- Simple text styling with color transitions
- No background or border
-
Icon Buttons:
- Circular buttons with icons
- Light background with color transitions
- Used for actions like opening modals
-
Edit Buttons:
- Subtle icon buttons that appear on hover
- Semi-transparent backgrounds
- Used for editing actions in dashboard widgets
-
Add Widget Button:
- Dashed border button for adding new items
- Changes appearance on hover
The application includes several types of widgets with themed components:
-
Clock Widget: Displays time with timezone support
- Themed with customizable colors
- Responsive design for different screen sizes
-
Calendar Widget: Shows date information
- Themed with customizable colors
- Fixed date/month selection capability
-
Habits Tracking Widget: Tracks daily habits with counters
- Themed with customizable colors
- History tracking with timestamps
All components support dynamic theming with customizable colors:
-
Themed Buttons:
- Support custom background, primary, positive, and negative colors
- Automatically adapt to light/dark modes
- Consistent styling across all themes
-
Themed Widgets:
- Support custom color schemes per widget
- Dark/light theme compatibility
- Consistent visual appearance across all widgets
-
Themed Forms:
- Inputs, checkboxes, and select elements adapt to themes
- Consistent styling across light/dark modes
- Support for themed validation states
-
Themed Modals and Dialogs:
- Full theme support for overlays
- Consistent styling with main application theme
- Proper contrast ratios in all themes
All buttons have:
- Smooth hover transitions
- Appropriate sizing for their context
- Accessible color contrast
All form controls follow a consistent flat design with rounded corners and subtle shadows.
- Full width with padding
- Rounded corners (rounded-xl)
- Light border (border-gray-200)
- Focus ring in primary color
- Subtle inset shadow
- Square shape with rounded corners matching inputs (rounded-xl)
- Border color matches input borders (border-gray-200)
- Checked state uses primary color (#8A89F0)
- Custom checkmark using CSS pseudo-elements
- Consistent sizing (w-5 h-5)
- Styled identically to text inputs using .flat-input class
- Custom styled toggle switches
- Smooth sliding animation
- Primary color for active state
Custom select components have been created for enhanced UX:
-
Color Select Component:
- Displays color options with circular color indicators
- Supports both light and dark themes
- Fully accessible with keyboard navigation
- Custom dropdown styling that adapts to theme
-
Icon Select Component:
- Displays icon options with actual Lucide icons
- Supports both light and dark themes
- Fully accessible with keyboard navigation
- Custom dropdown styling that adapts to theme
- Simple circular spinner using CSS animations
- Primary color for active arc
- All styles are defined in styles.css
- Components use Tailwind utility classes combined with custom CSS
- Dark mode variants are provided for all components
- All interactive elements have hover and focus states
- Consistent spacing using Tailwind's spacing scale
To use these styles in your components:
<!-- Primary Gradient Button -->
<button class="text-xl font-bold py-4 rounded-2xl text-white bg-pastel-blue transition-all duration-300 transform hover:scale-[1.02] flat-btn-shadow bg-gradient-to-tr from-[#8A89F0] to-[#A2C0F5] tracking-wide">
Sign In
</button>
<!-- Primary Button with Icon -->
<button class="flex items-center justify-center text-xl font-bold py-4 rounded-2xl text-white bg-pastel-blue transition-all duration-300 transform hover:scale-[1.02] flat-btn-shadow bg-gradient-to-tr from-[#8A89F0] to-[#A2C0F5] tracking-wide">
<i data-lucide="plus" class="w-5 h-5 mr-2"></i>
Create New Dashboard
</button>
<!-- Secondary Text Button -->
<button class="text-pastel-blue font-semibold hover:text-pastel-blue/80 transition-colors">
Login via Telegram
</button>
<!-- Icon Button -->
<button class="text-pastel-blue hover:text-pastel-blue/80 p-2 rounded-full transition-colors bg-pastel-blue/10 dark:bg-pastel-blue/30">
<i data-lucide="calendar" class="w-6 h-6"></i>
</button>
<!-- Edit Button -->
<button class="text-gray-400 hover:text-pastel-blue p-2 rounded-full bg-white/70 backdrop-blur-sm dark:bg-[#1e1e1e]/70">
<i data-lucide="pencil" class="w-5 h-5"></i>
</button>
<!-- Add Widget Button -->
<button class="text-gray-500 hover:text-pastel-blue font-bold flex items-center border-2 border-dashed border-gray-200 rounded-xl p-4 hover:border-pastel-blue/50 hover:bg-pastel-blue/5 dark:border-gray-700 dark:hover:bg-pastel-blue/10">
<i data-lucide="plus" class="w-5 h-5 mr-2"></i>
Add Widget
</button>
<!-- Text Input -->
<input type="text" class="flat-input" placeholder="Enter text">
<!-- Checkbox -->
<input type="checkbox" class="flat-checkbox">
<!-- Radio Button -->
<input type="radio" class="flat-checkbox">
<!-- Toggle Switch -->
<label class="flat-switch">
<input type="checkbox">
<span class="flat-switch-slider"></span>
</label>