RefactKit’s design system is built on shadcn/ui components, Tailwind CSS v4, and a set of semantic CSS variables defined inDocumentation Index
Fetch the complete documentation index at: https://docs.refactkit.com/llms.txt
Use this file to discover all available pages before exploring further.
src/styles/globals.css. Every color, radius, and font in the UI maps to a CSS variable — so swapping the entire look of your application is a matter of replacing one set of variable values, either by applying a shadcn preset or by editing the variables directly.
How the theme system works
Tailwind v4 introduces the@theme directive, which maps CSS variables to Tailwind utility classes. RefactKit’s globals.css wires this up so that classes like bg-primary and text-muted-foreground resolve to the active CSS variable values at runtime:
:root (light mode) and .dark (dark mode) blocks, expressed as oklch() values for wide color gamut support:
Apply a theme preset from shadcn
The fastest way to change your brand colors is to generate a preset at ui.shadcn.com and apply it with the shadcn CLI::root and .dark blocks in globals.css with the new color values. All components that use semantic tokens will update automatically on the next dev server reload.
Design system rules
Following these rules keeps the UI consistent across all themes and ensures components render correctly in both light and dark mode.| Rule | Do | Don’t |
|---|---|---|
| Colors | bg-primary, text-muted-foreground, border-border | bg-blue-500, dark:bg-slate-900 |
| Spacing | flex flex-col gap-4 | space-y-4 |
| Dimensions | size-10 (sets equal width and height) | w-10 h-10 |
| Icons | data-icon="inline-start" attribute | Raw inline SVG |
| Themes | CSS variables via @theme | Hardcoded oklch() or hex values in components |
bg-primary works correctly in every preset because the variable value changes, not the class name.
Light, dark, and system mode
RefactKit usesnext-themes to manage the color scheme. The ThemeProvider wraps the app in the root layout and reads the user’s preference from localStorage. Three modes are available:
- Light — forces the
:rootvariable set - Dark — forces the
.darkclass on<html>, activating the dark variable set - System — follows
prefers-color-schemefrom the OS
@custom-variant dark directive in globals.css ensures Tailwind’s dark: prefix works with the .dark class-based strategy:
localStorage.
Icon systems
RefactKit ships two icon libraries. Use them depending on the context: Phosphor Icons — for expressive, illustrative icons with multiple weights:size-* utility class for dimensions rather than explicit w- and h- classes, per the design system rules above.
Font system
Three fonts are loaded inglobals.css and controlled by the --font-family CSS variable. The active font switches based on the [data-font] attribute on <html>, which the Appearance settings page manages:
data-font value | Font | Use case |
|---|---|---|
| (not set, LTR) | Google Sans Flex Variable | Default for all LTR locales |
| (not set, RTL) | Zain | Automatic for Arabic |
google-sans | Google Sans Flex Variable | Manual override |
geist | Geist Variable | Developer-oriented look |
baloo | Baloo Bhaijaan 2 | Rounded, friendly style |
globals.css and add a [data-font] rule that sets --font-family.