This guide defines the visual and interaction standards for the Attack-a-Crack CRM application to ensure consistency across all interfaces.
- Dark Theme First: Optimized for extended use in various lighting conditions
- Information Density: Maximize useful information while maintaining readability
- Consistent Interactions: Predictable patterns across all features
- Mobile Responsive: Works seamlessly on desktop and mobile devices
- Background Base:
bg-gray-900(#111827) - Sidebar, modals - Background Main:
bg-gray-800(#1F2937) - Main content area - Background Elevated:
bg-gray-700(#374151) - Cards, hover states
- Primary Text:
text-white- Main content - Secondary Text:
text-gray-400(#9CA3AF) - Supporting text, labels - Link Text:
text-blue-400(#60A5FA) - Interactive links - Link Hover:
text-blue-300(#93BBFE) - Hover state for links
- Success:
text-green-400/bg-green-600- Positive actions, success states - Warning:
text-yellow-400/bg-yellow-600- Warnings, pending states - Error:
text-red-500/bg-red-600- Errors, destructive actions - Info:
text-blue-400/bg-blue-600- Informational messages
- Page Title:
text-3xl font-bold(30px bold) - Section Title:
text-2xl font-bold(24px bold) - Subsection:
text-xl font-bold(20px bold) - Body Text:
text-base(16px) - Default - Small Text:
text-sm(14px) - Labels, secondary info - Tiny Text:
text-xs(12px) - Timestamps, metadata
- Bold:
font-bold- Headings, emphasis - Semibold:
font-semibold- Subheadings - Medium:
font-medium- Navigation items - Normal: Default - Body text
<button class="bg-blue-600 hover:bg-blue-700 text-white font-bold py-2 px-4 rounded focus:outline-none focus:shadow-outline">
Primary Action
</button><button class="bg-gray-600 hover:bg-gray-700 text-white font-bold py-2 px-4 rounded focus:outline-none focus:shadow-outline">
Secondary Action
</button><button class="bg-red-600 hover:bg-red-700 text-white font-bold py-2 px-4 rounded focus:outline-none focus:shadow-outline">
Delete
</button><a href="#" class="text-gray-400 hover:text-white">Cancel</a><input type="text"
class="shadow appearance-none border border-gray-600 rounded w-full py-2 px-3 bg-gray-700 text-white leading-tight focus:outline-none focus:shadow-outline"><select class="shadow appearance-none border border-gray-600 rounded w-full py-2 px-3 bg-gray-700 text-white leading-tight focus:outline-none focus:shadow-outline">
<option>Option 1</option>
</select><label class="block text-gray-300 text-sm font-bold mb-2">Field Label</label><div class="bg-gray-800 p-6 rounded-lg shadow-lg">
<!-- Card content -->
</div><div class="bg-gray-800 rounded-lg shadow-lg overflow-hidden">
<table class="min-w-full">
<!-- Table content -->
</table>
</div><a class="flex items-center px-4 py-3 text-sm font-medium rounded-lg bg-gray-700 text-blue-400">
<span class="mr-3 text-lg">π</span>
Active Item
</a><a class="flex items-center px-4 py-3 text-sm font-medium rounded-lg transition-colors hover:bg-gray-700">
<span class="mr-3 text-lg">π</span>
Inactive Item
</a><div class="flex">
<!-- Sidebar: 256px fixed width -->
<div class="w-64 h-screen bg-gray-900 flex-shrink-0 overflow-y-auto">
<!-- Navigation -->
</div>
<!-- Main Content -->
<div class="flex-1 p-8 overflow-y-auto">
<!-- Page content -->
</div>
</div><div class="flex justify-between items-center mb-8">
<h1 class="text-3xl font-bold">Page Title</h1>
<button class="bg-blue-600 hover:bg-blue-700 text-white font-bold py-2 px-4 rounded">
Primary Action
</button>
</div><table class="min-w-full">
<thead class="bg-gray-700">
<tr>
<th class="px-6 py-3 text-left text-xs font-medium text-gray-300 uppercase tracking-wider">
Column Header
</th>
</tr>
</thead>
<tbody class="divide-y divide-gray-700">
<tr class="hover:bg-gray-700">
<td class="px-6 py-4 whitespace-nowrap">
Cell Content
</td>
</tr>
</tbody>
</table>- Large:
p-8(32px) - Page container - Medium:
p-6(24px) - Cards, modals - Small:
p-4(16px) - Compact sections - Tiny:
p-2(8px) - Inline elements
- Section Gap:
mb-8(32px) - Between major sections - Element Gap:
mb-4(16px) - Between related elements - Label Gap:
mb-2(8px) - Between labels and inputs
- Buttons: Darken background color (e.g.,
hover:bg-blue-700) - Links: Lighten text color (e.g.,
hover:text-blue-300) - Table Rows: Add background (e.g.,
hover:bg-gray-700)
- Inputs: Use
focus:outline-none focus:shadow-outline - Buttons: Same as inputs for consistency
- Navigation:
transition-colorsfor smooth color changes - All Interactive Elements: Consider adding transitions for polish
- Dashboard: π
- Messages: π¬
- Contacts: π₯
- Campaigns: π’
- Settings: βοΈ
- Success: β
- Error: β
- Warning:
β οΈ - Info: βΉοΈ
- Mobile: < 640px
- Tablet: 640px - 1024px
- Desktop: > 1024px
- Sidebar becomes hamburger menu
- Tables scroll horizontally
- Reduce padding on mobile:
p-4instead ofp-8
- All interactive elements must be keyboard accessible
- Maintain sufficient color contrast (WCAG AA minimum)
- Provide appropriate ARIA labels where needed
- Focus indicators must be visible
- Use semantic HTML elements
- Provide alt text for images
- Ensure form labels are properly associated
- Test with keyboard navigation
- Consistency First: When in doubt, follow existing patterns
- Tailwind Classes: Use utility classes; avoid custom CSS
- Component Reuse: Extract common patterns into templates
- Performance: Minimize JavaScript; use CSS transitions
- Testing: Verify on both desktop and mobile devices