Bloques
DashboardGitHub
DashboardGitHub

Get started

QuickstartIntroduction

Writing content

MDX basicsMarkdown reference

Configuration

docs.json overviewNavigationThemeNavbarInternationalizationSchema reference

API reference

API reference overviewSet up an API reference

Publishing

Connect GitHubDeploymentsCustom domainLLM endpointsMCP server

Team

OrganizationsMembers and roles

Theme

Pick a preset, override the primary color, and let visitors switch between light and dark.

The theme field in docs.json controls the colors and dark mode of your rendered site.

Presets

Four presets ship with Bloques. Set one with the preset field.

  • default — neutral grays.
  • ocean — cool blues.
  • emerald — fresh greens.
  • rose — warm pinks.
docs.json
{
  "theme": {
    "preset": "ocean"
  }
}

Each preset defines a full light and dark palette. The dark palette is paired automatically — set the preset once and both modes work.

Primary color override

Replace a preset's primary (and focus ring) color with primaryOverride. The value applies to both light and dark mode.

docs.json
{
  "theme": {
    "preset": "default",
    "primaryOverride": "oklch(0.62 0.19 145)"
  }
}

primaryOverride accepts any valid CSS color: hex (#10b981), rgb(), hsl(), oklch(), or a named color. The string is written verbatim into the site's CSS, so pick a value with enough contrast against white text — the primary color is used as a background for primary buttons.

Pick a single color to override the brand accent without losing a preset's tuned surfaces and borders.

Dark mode

Header theme switch with Light, Dark, and System options

Every preset ships with a paired dark palette, so dark mode works out of the box. The site renders a theme switch in the header with three options: Light, Dark, and System. The default is System, which follows the visitor's operating system preference.

Dark mode is always available. There is no docs.json field to disable it or to force a default mode.

Next

docs.json overview

See every top-level field at a glance.

Go to content

Navbar

Add external links to the top bar.

Go to content

On this page

Presets
Primary color override
Dark mode
Next