Theming

Customize your project with MicroClub's signature themes.

Overview

mcoli-ui ships with 5 signature themes designed to give your project a distinct visual identity. Each theme is crafted with MicroClub DNA, combining professional aesthetics with a bold, modern edge.

All themes support both light and dark modes out of the box.

Available Themes

ThemeValueDescriptionLight PrimaryDark Primary
PrimaryprimaryClean, professional look with baby blue accents#0006B1#D9DDFF
SecondarysecondaryCreative and bold with purple tones#6A0DAD#8B5CF6
Game Devgame-devBold colors inspired by game development#D04F99#FBE2A7
RoboticsroboticsTechnical feel with industrial blue tones#001EFF#2563EF
ITitModern tech palette for software projects#34D399#34D399

Add a Theme to Your Project

Deploy a theme directly to your project:

npx mcoli-ui@latest init
pnpm dlx mcoli-ui@latest init
yarn dlx mcoli-ui@latest init
bunx mcoli-ui@latest init

Interactive Mode

Running npx mcoli-ui@latest init without arguments launches an interactive theme selector.

Specify a Theme Directly

You can also specify a theme directly:

npx mcoli-ui@latest init primary
pnpm dlx mcoli-ui@latest init primary
yarn dlx mcoli-ui@latest init primary
bunx mcoli-ui@latest init primary

Available themes: primary, secondary, game-dev, robotics, it

Manual Setup

If you prefer manual control:

Choose a theme

Select from the available themes:

  • primary - Professional and modern
  • secondary - Creative and bold
  • game-dev - Fun and energetic
  • robotics - Technical and precise
  • it - Clean and professional
Copy the theme configuration

Each theme exports light and dark color palettes. Theme files are located in:

src/registry/themes/{themeName}Theme.ts

For example, the Primary theme is at src/registry/themes/primaryTheme.ts.

Configure Tailwind CSS v4

Add the theme variables to your global CSS:

@theme {
  --color-primary: oklch(70% 0.15 240);
  --color-secondary: oklch(20% 0.15 240);
  /* ... other theme colors */
}

Theme Structure

Each theme follows this structure:

export const themeName = {
  // Border radius values (vary by theme)
  theme: {
    'radius-sm': '0.125rem', // robotics uses tighter radii
    'radius-md': '0.375rem',
    'radius-lg': '0.5rem',
    'radius-xl': '0.75rem',
    'radius-2xl': '1rem', // game-dev uses 1rem
  },
  // Light mode colors
  light: {
    background: '...',
    foreground: '...',
    primary: '...',
    'primary-foreground': '...',
    // ... more colors
  },
  // Dark mode colors
  dark: {
    background: '...',
    foreground: '...',
    primary: '...',
    'primary-foreground': '...',
    // ... more colors
  },
};

Border radius values differ between themes. Robotics uses tighter radii (0.125rem), while Game Dev uses a larger radius-2xl (1rem).

Color System

All themes use a consistent color system. Here are all the available CSS variables you can use in your components. Each theme has its own values for light and dark modes.

TokenUsage
--backgroundPage background
--foregroundPrimary text
--primaryMain brand color
--primary-foregroundText on primary
--secondarySecondary actions
--secondary-foregroundText on secondary
--accentHighlights
--accent-foregroundText on accent
--cardCard background
--card-foregroundCard text
--popoverPopover background
--popover-foregroundPopover text
--mutedMuted backgrounds
--muted-foregroundMuted text
--destructiveError states
--destructive-foregroundText on destructive
--borderBorders
--inputInput backgrounds
--ringFocus ring
--surfaceSurface backgrounds
--surface-foregroundSurface text
--successSuccess states
--success-foregroundText on success
--warningWarning states
--warning-foregroundText on warning
--errorError states
--infoInfo states
--info-foregroundText on info

Sidebar-specific variables for navigation components:

TokenUsage
--sidebarSidebar background
--sidebar-foregroundSidebar text
--sidebar-primarySidebar brand color
--sidebar-primary-foregroundText on sidebar primary
--sidebar-accentSidebar accent
--sidebar-accent-foregroundText on sidebar accent
--sidebar-borderSidebar borders
--sidebar-ringSidebar focus ring

Chart Colors

Colors for data visualization:

Token
--chart-1
--chart-2
--chart-3
--chart-4
--chart-5

Using Colors in Components

In your Tailwind classes, use these tokens as follows:

className = 'text-muted-foreground'; // Uses --muted-foreground
className = 'bg-primary'; // Uses --primary
className = 'border-border'; // Uses --border
className = 'text-destructive'; // Uses --destructive

All colors are available as bg-, text-, border-, and other Tailwind utilities.

Switching Themes

mcoli-ui components use CSS variables tied to theme tokens. To switch themes, re-run the init command with your desired theme:

npx mcoli-ui@latest init secondary
pnpm dlx mcoli-ui@latest init secondary
yarn dlx mcoli-ui@latest init secondary
bunx mcoli-ui@latest init secondary

This updates your registry configuration with the new theme's CSS variables.

Customizing Themes

For advanced customization, you can extend or override any theme:

@theme {
  --color-primary: var(--primary);
  --radius-lg: 1rem;
}

:root {
  --primary: your-custom-color;
}

.dark {
  --primary: your-custom-color;
}

This gives you full control while maintaining consistency across your project.

On this page