Skip to content

Design & UX

Design & UX

Consistent design patterns across all Manacore applications for a unified user experience.

Design Principles

  1. Consistency - Same patterns across all apps
  2. Simplicity - Clean, uncluttered interfaces
  3. Accessibility - Usable by everyone
  4. Performance - Fast, responsive interactions
  5. Feedback - Clear system status communication

Color System

Semantic Colors

PurposeLight ModeDark ModeUsage
Primaryblue-500blue-400CTAs, links, active states
Successgreen-500green-400Confirmations, completed
Warningamber-500amber-400Caution, attention
Errorred-500red-400Errors, destructive actions
Neutralgray-*gray-*Text, backgrounds, borders

Tailwind Usage

// Primary actions
<button className="bg-blue-500 hover:bg-blue-600 text-white">
Submit
</button>
// Success state
<div className="bg-green-100 text-green-800 dark:bg-green-900 dark:text-green-200">
Success!
</div>
// Error state
<span className="text-red-500">Error message</span>
// Neutral backgrounds
<div className="bg-white dark:bg-gray-900">
<p className="text-gray-900 dark:text-gray-100">Content</p>
</div>

Typography

Scale

SizeClassUsage
xstext-xsLabels, captions
smtext-smSecondary text, metadata
basetext-baseBody text
lgtext-lgEmphasis, subheadings
xltext-xlSection headings
2xltext-2xlPage headings
3xl+text-3xlHero text, landing pages

Font Weights

// Regular content
<p className="font-normal">Body text</p>
// Emphasis
<p className="font-medium">Important text</p>
// Headings
<h2 className="font-semibold">Section Title</h2>
// Strong emphasis
<h1 className="font-bold">Page Title</h1>

Spacing

Use Tailwind’s spacing scale consistently:

SpaceClassPixelsUsage
1p-1, m-14pxTight spacing
2p-2, m-28pxCompact elements
3p-3, m-312pxDefault padding
4p-4, m-416pxCard padding
6p-6, m-624pxSection spacing
8p-8, m-832pxLarge sections
// Card with consistent spacing
<div className="p-4 space-y-3">
<h3 className="text-lg font-semibold">Title</h3>
<p className="text-gray-600">Description</p>
<button className="mt-4">Action</button>
</div>
// List with gaps
<ul className="space-y-2">
<li>Item 1</li>
<li>Item 2</li>
</ul>

Components

Buttons

// Primary - main actions
<button className="bg-blue-500 hover:bg-blue-600 text-white px-4 py-2 rounded-lg">
Primary
</button>
// Secondary - alternative actions
<button className="bg-gray-200 hover:bg-gray-300 text-gray-900 px-4 py-2 rounded-lg">
Secondary
</button>
// Ghost - subtle actions
<button className="hover:bg-gray-100 text-gray-700 px-4 py-2 rounded-lg">
Ghost
</button>
// Destructive - dangerous actions
<button className="bg-red-500 hover:bg-red-600 text-white px-4 py-2 rounded-lg">
Delete
</button>

Cards

// Basic card
<div className="bg-white dark:bg-gray-800 rounded-xl shadow-sm border border-gray-200 dark:border-gray-700 p-4">
<h3 className="font-semibold">Card Title</h3>
<p className="text-gray-600 dark:text-gray-400 mt-2">Card content</p>
</div>
// Interactive card
<button className="bg-white dark:bg-gray-800 rounded-xl shadow-sm border border-gray-200 dark:border-gray-700 p-4 hover:shadow-md hover:border-blue-300 transition-all w-full text-left">
<h3 className="font-semibold">Clickable Card</h3>
</button>

Forms

// Input
<input
type="text"
className="w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-lg bg-white dark:bg-gray-800 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent"
placeholder="Enter text..."
/>
// With label and error
<div className="space-y-1">
<label className="text-sm font-medium text-gray-700 dark:text-gray-300">
Email
</label>
<input
type="email"
className="w-full px-3 py-2 border border-red-500 rounded-lg focus:outline-none focus:ring-2 focus:ring-red-500"
/>
<p className="text-sm text-red-500">Invalid email address</p>
</div>

Loading States

Skeletons

// Text skeleton
<div className="animate-pulse">
<div className="h-4 bg-gray-200 dark:bg-gray-700 rounded w-3/4"></div>
<div className="h-4 bg-gray-200 dark:bg-gray-700 rounded w-1/2 mt-2"></div>
</div>
// Card skeleton
<div className="animate-pulse p-4 border rounded-xl">
<div className="h-6 bg-gray-200 dark:bg-gray-700 rounded w-1/3 mb-4"></div>
<div className="space-y-2">
<div className="h-4 bg-gray-200 dark:bg-gray-700 rounded"></div>
<div className="h-4 bg-gray-200 dark:bg-gray-700 rounded w-5/6"></div>
</div>
</div>

Spinners

// Simple spinner
<div className="w-6 h-6 border-2 border-blue-500 border-t-transparent rounded-full animate-spin"></div>
// Full page loading
<div className="fixed inset-0 bg-white/80 dark:bg-gray-900/80 flex items-center justify-center">
<div className="w-8 h-8 border-3 border-blue-500 border-t-transparent rounded-full animate-spin"></div>
</div>

Animations

Transitions

// Fade in
<div className="transition-opacity duration-200 opacity-0 data-[visible=true]:opacity-100">
// Slide up
<div className="transition-all duration-200 translate-y-2 opacity-0 data-[visible=true]:translate-y-0 data-[visible=true]:opacity-100">
// Scale
<button className="transition-transform hover:scale-105 active:scale-95">

Motion Guidelines

  • Duration: 150-300ms for micro-interactions, 300-500ms for larger transitions
  • Easing: Use ease-out for entrances, ease-in for exits
  • Purpose: Every animation should have a purpose (feedback, guidance, delight)

Accessibility

Requirements

  1. Color contrast - 4.5:1 for text, 3:1 for large text
  2. Focus indicators - Visible focus rings on all interactive elements
  3. Keyboard navigation - All features usable without mouse
  4. Screen readers - Proper ARIA labels and semantic HTML
  5. Motion - Respect prefers-reduced-motion

Implementation

// Focus visible
<button className="focus:outline-none focus-visible:ring-2 focus-visible:ring-blue-500">
// Screen reader text
<button aria-label="Close menu">
<XIcon className="w-5 h-5" aria-hidden="true" />
</button>
// Reduced motion
<div className="motion-safe:animate-bounce motion-reduce:animate-none">
// Skip link
<a href="#main" className="sr-only focus:not-sr-only focus:absolute focus:top-4 focus:left-4">
Skip to main content
</a>

Dark Mode

All components must support dark mode:

// Background
<div className="bg-white dark:bg-gray-900">
// Text
<p className="text-gray-900 dark:text-gray-100">
// Borders
<div className="border-gray-200 dark:border-gray-700">
// Hover states
<button className="hover:bg-gray-100 dark:hover:bg-gray-800">

Responsive Design

Mobile-first approach with breakpoints:

BreakpointMin WidthUsage
(default)0pxMobile
sm:640pxLarge phones
md:768pxTablets
lg:1024pxLaptops
xl:1280pxDesktops
// Responsive grid
<div className="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-4">
// Responsive padding
<div className="p-4 md:p-6 lg:p-8">
// Hide/show
<div className="hidden md:block">Desktop only</div>
<div className="md:hidden">Mobile only</div>