The template’s theme system is built around a single principle: every visual decision that could vary between agencies is expressed as a named design token, never as a hardcoded Tailwind class inside a component. ADocumentation Index
Fetch the complete documentation index at: https://mintlify.com/Ozcaar/real-estate-template/llms.txt
Use this file to discover all available pages before exploring further.
ThemeConfig TypeScript object is the single source of truth. At startup, the theme.ts Nuxt plugin calls themeToCssVars() to serialize the entire object into a :root { … } CSS block and inject it into the page <head> — both during SSR and on the client. Components then consume tokens exclusively through CSS custom properties (var(--color-primary), var(--radius-md), etc.), which means changing the entire visual identity of the site requires editing one TypeScript file with zero component modifications.
How the pipeline works
theme.ts plugin runs on both server and client, so the correct branding is embedded in the SSR response with no flash of unstyled content:
app/plugins/theme.ts
The default theme
The template ships with a clean, neutral default theme. These are the exact values fromapp/themes/default.theme.ts:
app/themes/default.theme.ts
CSS variable reference
themeToCssVars() maps every token in the ThemeConfig to a CSS custom property on :root. The table below shows every variable name and its corresponding TypeScript field.
Colors
| CSS variable | TypeScript field | Default value |
|---|---|---|
--color-background | colors.background | #FFFFFF |
--color-foreground | colors.foreground | #111827 |
--color-surface | colors.surface | #FFFFFF |
--color-surface-muted | colors.surfaceMuted | #F5F5F4 |
--color-primary | colors.primary | #0F766E |
--color-primary-foreground | colors.primaryForeground | #FFFFFF |
--color-secondary | colors.secondary | #F5F5F4 |
--color-secondary-foreground | colors.secondaryForeground | #111827 |
--color-accent | colors.accent | #D97706 |
--color-accent-foreground | colors.accentForeground | #FFFFFF |
--color-muted | colors.muted | #6B7280 |
--color-border | colors.border | #E5E7EB |
--color-card | colors.card | #FFFFFF |
--color-card-foreground | colors.cardForeground | #111827 |
--color-success | colors.success | #16A34A |
--color-warning | colors.warning | #D97706 |
--color-error | colors.error | #DC2626 |
Typography
| CSS variable | TypeScript field | Default value |
|---|---|---|
--font-heading | fonts.heading | Inter, system-ui, sans-serif |
--font-body | fonts.body | Inter, system-ui, sans-serif |
--font-serif | fonts.serif | Georgia, "Times New Roman", serif |
Radius
| CSS variable | TypeScript field | Default value |
|---|---|---|
--radius-sm | radius.sm | 0.375rem |
--radius-md | radius.md | 0.75rem |
--radius-lg | radius.lg | 1rem |
--radius-xl | radius.xl | 1.5rem |
--radius-full | radius.full | 9999px |
Shadows
| CSS variable | TypeScript field | Default value |
|---|---|---|
--shadow-sm | shadow.sm | 0 1px 2px rgb(0 0 0 / 0.08) |
--shadow-md | shadow.md | 0 8px 24px rgb(0 0 0 / 0.10) |
--shadow-lg | shadow.lg | 0 16px 48px rgb(0 0 0 / 0.14) |
Layout
| CSS variable | TypeScript field | Default value |
|---|---|---|
--container-max-width | layout.containerMaxWidth | 1280px |
--section-spacing | layout.sectionSpacing | 5rem |
Using tokens in components
Reference design tokens in Vue components using Tailwind CSS’s arbitrary value syntax. This keeps all visual decisions in the theme object and ensures that changing a color token updates every component that references it.Hardcoded Tailwind palette classes (
bg-teal-700, text-gray-900, rounded-xl, etc.) are fine for layout, spacing, grid, and responsiveness. They become a problem only when used for brand colors, font families, border radii, or shadows — those must always come from CSS variables.<style> block:
Creating a new theme
To create a theme for a luxury agency with dark backgrounds and gold accents, follow these three steps:Create the theme file
Create
app/themes/luxury.theme.ts exporting a ThemeConfig object. You only need to define the tokens you want to differ from the default — but all fields are required by the TypeScript interface.app/themes/luxury.theme.ts
Register the theme in the index
Add the new theme to the registry in
app/themes/index.ts:app/themes/index.ts
resolveTheme() fallback behavior
If the theme field in the agency config contains an ID that is not registered in the themes registry, resolveTheme() falls back to defaultTheme rather than crashing:
app/themes/index.ts
Tweaking the default theme without creating a new one
Tweaking the default theme without creating a new one
If you just want to change a few colors for a single-agency deployment, you can edit This is the simplest path for minor rebranding. Create a new named theme only when you need to switch between multiple distinct visual identities (e.g. a multi-agency white-label deployment).
app/themes/default.theme.ts directly instead of creating a new theme file. For example, to change the primary color from teal to indigo: