Export as

Style Guide

Design system colors, typography, and component styling for OFFER-HUB.

This guide documents the OFFER-HUB design system, including colors, typography, and component styling for both light and dark modes.

Color System

OFFER-HUB uses CSS variables for theme-aware colors. All colors automatically adapt when switching between light and dark modes.

Background Colors

TokenLight ModeDark ModeUsage
--color-bg-base#F1F3F7#1a1a2ePage background
--color-bg-elevated#ffffff#25253dCards, modals, elevated surfaces
--color-bg-sunken#e8eaef#12121fInset areas, input backgrounds

Text Colors

TokenLight ModeDark ModeUsage
--color-text-primary#19213D#f1f3f7Headings, primary text
--color-text-secondary#6D758F#a0a6b8Body text, descriptions
--color-text-muted#9ca3af#6D758FPlaceholder text, hints

Brand Colors

TokenLight ModeDark ModeUsage
--color-primary#149A9B#1fb8b9Primary buttons, links, accents
--color-primary-hover#0d7377#25d4d5Primary hover states
--color-secondary#002333#002333Secondary elements
--color-accent#15949C#15949CAccent highlights

Semantic Colors

TokenLight ModeDark ModeUsage
--color-success#16a34a#16a34aSuccess states
--color-warning#d97706#d97706Warning states
--color-error#FF0000#FF0000Error states

Shadow Colors (Neumorphic)

TokenLight ModeDark ModeUsage
--shadow-dark#d1d5db#0f0f1aDark shadow in neumorphic effects
--shadow-light#ffffff#252540Light shadow in neumorphic effects

Border Colors

TokenLight ModeDark ModeUsage
--color-border#d1d5db#3d3d5cBorders, dividers

Tailwind Utility Classes

Use these Tailwind classes for theme-aware styling:

Backgrounds

jsx
// Page background
<div className="bg-bg-base" />

// Card/elevated surface
<div className="bg-bg-elevated" />

// Sunken/inset area
<div className="bg-bg-sunken" />

Text

jsx
// Primary text (headings)
<h1 className="text-content-primary" />

// Secondary text (body)
<p className="text-content-secondary" />

// Muted text (hints)
<span className="text-content-muted" />

Brand Colors

jsx
// Primary color
<button className="bg-theme-primary hover:bg-theme-primary-hover" />

// Accent color
<span className="text-theme-accent" />

Neumorphic Shadows

jsx
// Raised surface
<div className="shadow-neu-raised" />

// Small raised surface
<div className="shadow-neu-raised-sm" />

// Sunken/pressed surface
<div className="shadow-neu-sunken" />

// Subtle sunken
<div className="shadow-neu-sunken-subtle" />

Borders

jsx
<div className="border border-theme-border" />

Typography

Font Family

OFFER-HUB uses Inter as the primary font:

css
font-family: var(--font-inter), Roboto, Outfit, sans-serif;

Font Weights

WeightClassUsage
400font-normalBody text
500font-mediumEmphasis, labels
700font-boldHeadings, buttons
900font-blackHero titles

Text Sizes

SizeClassUsage
12pxtext-xsSmall labels
13pxtext-[13px]Nav links
14pxtext-smBody text, buttons
16pxtext-baseDefault body
18-24pxtext-lg to text-2xlSubheadings
32-48pxtext-3xl to text-5xlSection titles
56-72pxtext-6xl to text-7xlHero titles

Component Styling

Buttons

Primary Button (Neumorphic)

jsx
<button className="btn-neumorphic-primary px-6 py-2 rounded-full text-sm font-semibold">
  Button Text
</button>

Secondary Button (Neumorphic)

jsx
<button className="btn-neumorphic-secondary px-6 py-2 rounded-full text-sm font-semibold">
  Button Text
</button>

Cards

jsx
<div className="bg-bg-elevated shadow-neu-raised rounded-2xl p-6">
  <h3 className="text-content-primary font-bold">Card Title</h3>
  <p className="text-content-secondary">Card description</p>
</div>

Inputs

jsx
<input
  type="text"
  className="bg-bg-sunken shadow-neu-sunken-subtle rounded-xl px-4 py-3 text-content-primary placeholder:text-content-muted border-none outline-none"
  placeholder="Enter text..."
/>

Z-Index Scale

ValueUsage
-1Background effects (dot grid)
0Default content
10Elevated cards
50Sticky elements
100Dropdowns
499Mobile menu backdrop
500Navbar
501Mobile menu panel
Warning

Ensure content cards have a higher z-index than background effects (like the dot grid) to prevent visual overlap.


Dark Mode Implementation

Using the Theme Toggle

The theme can be toggled using the useTheme hook:

tsx
import { useTheme } from '@/components/providers/ThemeProvider';

function MyComponent() {
  const { resolvedTheme, toggleTheme } = useTheme();

  return (
    <button onClick={toggleTheme}>
      Current theme: {resolvedTheme}
    </button>
  );
}

Theme Persistence

Theme preference is automatically saved to localStorage under the key offer-hub-theme and persists across sessions.

System Preference

When set to "system", the theme automatically follows the user's OS preference and updates in real-time if changed.


Migration Guide

When migrating components to support dark mode, replace hardcoded colors with theme-aware alternatives:

Before (Hardcoded)After (Theme-aware)
bg-[#F1F3F7]bg-bg-base
bg-whitebg-bg-elevated
text-[#19213D]text-content-primary
text-[#6D758F]text-content-secondary
text-[#149A9B]text-theme-primary
border-[#d1d5db]border-theme-border
style={{ background: "#F1F3F7" }}className="bg-bg-base"
style={{ color: "#19213D" }}className="text-content-primary"
Note

Always test components in both light and dark modes after migration to ensure proper contrast and visibility.