Skip to main content

Theme Editor MDX Components

BAZWEAVE·THEME
// portable theme components for MDX hosts

Theme Editor

@ragbaz/bazweave-theme/mdx

Six typography presets, an interactive workbench, role-based font mapping, and full-surface specimen suites — all usable from Docusaurus and other MDX hosts.

PRESETS · WORKBENCH · ROLES · SPECIMENS · CSS VARS

The theme editor depends on @ragbaz/bazweave-font for shared font specimens, so theme examples show the same type vocabulary as the font chooser without copying components. Source templates come from the Articulate universe storefront style editor — role-based typography presets for Display, Heading, Subheading, Body, and Button text.


All 6 Theme Presets

Compact specimen cards for quick visual comparison. Each uses its own typography palette, font roles, and accent colors.

Clean theme specimen
Build the theme as content, then render it as interface.

Typed role systems make MDX examples portable.

Bazweave theme templates package the old storefront style-editor presets as portable data and MDX components, while Bazweave font remains the source of the font chooser and specimen layer.

Editorial theme specimen
Build the theme as content, then render it as interface.

Typed role systems make MDX examples portable.

Bazweave theme templates package the old storefront style-editor presets as portable data and MDX components, while Bazweave font remains the source of the font chooser and specimen layer.

Technical theme specimen
Build the theme as content, then render it as interface.

Typed role systems make MDX examples portable.

Bazweave theme templates package the old storefront style-editor presets as portable data and MDX components, while Bazweave font remains the source of the font chooser and specimen layer.

Warm theme specimen
Build the theme as content, then render it as interface.

Typed role systems make MDX examples portable.

Bazweave theme templates package the old storefront style-editor presets as portable data and MDX components, while Bazweave font remains the source of the font chooser and specimen layer.

Haute theme specimen
Build the theme as content, then render it as interface.

Typed role systems make MDX examples portable.

Bazweave theme templates package the old storefront style-editor presets as portable data and MDX components, while Bazweave font remains the source of the font chooser and specimen layer.

Vintage theme specimen
Build the theme as content, then render it as interface.

Typed role systems make MDX examples portable.

Bazweave theme templates package the old storefront style-editor presets as portable data and MDX components, while Bazweave font remains the source of the font chooser and specimen layer.

PresetIDDisplayHeadingBody
CleancleanInterInterInter
EditorialeditorialPlayfair DisplayDM SansLora
TechnicaltechnicalSpace GroteskSpace GroteskIBM Plex Sans
WarmwarmFrauncesNunitoNunito
HautehauteCormorant GaramondRalewayCrimson Pro
VintagevintagePlayfair DisplayCormorant GaramondLora

Interactive Template Deck

Click a preset card to update the role matrix and inline specimen below.

Technical role map
DisplayAa Rr 012Space Grotesk / variable / 300-700
HeadingAa Rr 012Space Grotesk / variable / 300-700
SubheadingAa Rr 012IBM Plex Sans / static / 400, 500
BodyAa Rr 012IBM Plex Sans / static / 400
ButtonAa Rr 012Space Grotesk / variable / 300-700
Technical theme specimen
Build the theme as content, then render it as interface.

Typed role systems make MDX examples portable.

Bazweave theme templates package the old storefront style-editor presets as portable data and MDX components, while Bazweave font remains the source of the font chooser and specimen layer.


Role Matrix

Five font roles map to CSS custom properties at theme-apply time. Each role controls a distinct surface: display headlines, section headings, subheadings, body copy, and button text.

Below is the role map for the technical preset:

Technical role map
DisplayAa Rr 012Space Grotesk / variable / 300-700
HeadingAa Rr 012Space Grotesk / variable / 300-700
SubheadingAa Rr 012IBM Plex Sans / static / 400, 500
BodyAa Rr 012IBM Plex Sans / static / 400
ButtonAa Rr 012Space Grotesk / variable / 300-700

The same matrix works for any preset by passing its id as the theme prop:

Editorial role map
DisplayAa Rr 012Playfair Display / static / 700
HeadingAa Rr 012DM Sans / variable / 100-700
SubheadingAa Rr 012DM Sans / variable / 100-700
BodyAa Rr 012Lora / static / 400, 600
ButtonAa Rr 012DM Sans / variable / 100-700

Surface Specimens

The full specimen suite previews a theme across five surfaces in one view: prose/article, product card, command/data panel, button set, and form controls.

Haute specimen suite#0d0d0d / #8b6f47

Docs prose

Atlas pages need specimen-grade theme editing.

The normal RAGBAZ specimen combines prose, metadata, code-like labels, compact controls, and a product card in one view so theme decisions show their real consequences before they ship.

Review specimen suite

Product card

Bazweave Kit

Theme roles must survive cards, lists, badges, and short commercial copy without collapsing into one anonymous sans-serif layer.

mdxthemefont

Command panel

theme.apply({
  display: "var(--bt-font-display)",
  accent: "#8b6f47",
  suite: "docs + card + form"
});

Buttons

Form controls

Try the same suite with a different theme:

Technical specimen suite#09090b / #3b3b4f

Docs prose

Atlas pages need specimen-grade theme editing.

The normal RAGBAZ specimen combines prose, metadata, code-like labels, compact controls, and a product card in one view so theme decisions show their real consequences before they ship.

Review specimen suite

Product card

Bazweave Kit

Theme roles must survive cards, lists, badges, and short commercial copy without collapsing into one anonymous sans-serif layer.

mdxthemefont

Command panel

theme.apply({
  display: "var(--bt-font-display)",
  accent: "#3b3b4f",
  suite: "docs + card + form"
});

Buttons

Form controls


CSS Custom Properties

When a theme is applied, the buildThemeCssVars(theme) helper produces these CSS custom properties. They drive every specimen and surface above.

--bt-palette-1palette[0]Primary palette — display headlines, structural color
--bt-palette-2palette[1]Secondary palette — headings, subheadings
--bt-font-displayfontDisplay.familySystem stack for display-level headlines
--bt-font-headingfontHeading.familySection and page headings
--bt-font-subheadingfontSubheading.familySub-sections, sidebar labels
--bt-font-bodyfontBody.familyParagraphs, descriptions, long-form content
--bt-font-buttonfontButton.familyCall-to-action and navigation controls

Full Workbench

The workbench combines preset selector, palette color pickers, font role selectors (from a curated list of 12 Google Fonts), and a JSON editor with save/load/copy/export actions.

Theme editor workbench
JSON theme / localStorage key: bazweave-theme-editor-themeidle
Export JSON
Technical role map
DisplayAa Rr 012Space Grotesk / variable / 300-700
HeadingAa Rr 012Space Grotesk / variable / 300-700
SubheadingAa Rr 012IBM Plex Sans / static / 400, 500
BodyAa Rr 012IBM Plex Sans / static / 400
ButtonAa Rr 012Space Grotesk / variable / 300-700
Technical specimen suite#09090b / #3b3b4f

Docs prose

Atlas pages need specimen-grade theme editing.

The normal RAGBAZ specimen combines prose, metadata, code-like labels, compact controls, and a product card in one view so theme decisions show their real consequences before they ship.

Review specimen suite

Product card

Bazweave Kit

Theme roles must survive cards, lists, badges, and short commercial copy without collapsing into one anonymous sans-serif layer.

mdxthemefont

Command panel

theme.apply({
  display: "var(--bt-font-display)",
  accent: "#3b3b4f",
  suite: "docs + card + form"
});

Buttons

Form controls

Changes made in the workbench update the role matrix and specimen suite beneath it in real time.


Font Integration

The theme package delegates large font specimens to @ragbaz/bazweave-font/mdx. This avoids duplicating the font display engine while keeping theme and font documentation in sync.

Editorial via bazweave-font
Slate
Editorial: Playfair Display + DM Sans + Lora

Neutral reading layer for Docusaurus pages, product UI, and long examples.

Editorial role map
DisplayAa Rr 012Playfair Display / static / 700
HeadingAa Rr 012DM Sans / variable / 100-700
SubheadingAa Rr 012DM Sans / variable / 100-700
BodyAa Rr 012Lora / static / 400, 600
ButtonAa Rr 012DM Sans / variable / 100-700

Font Chooser Theme Deck

The font chooser has its own theme deck with four surface variants: Slate (default), Elegant, Tufte (light/paper variant), and Formal (executive dark).

MDX specimen
Slate
RAGBAZ Intel Mono + neo-grotesque examples

Neutral reading layer for Docusaurus pages, product UI, and long examples.

Click a theme card to see the font specimen update. The font chooser themes are independent from the typography presets — they control the background surface for font previews rather than font role mappings.

Font Families

command / data
Aa Rr 012
Intel One Mono

RAGBAZ control labels, code, axis values, and compact technical copy.

neo-grotesque body
Aa Rr 012
Noto Sans

Neutral reading layer for Docusaurus pages, product UI, and long examples.

expressive grotesque
Aa Rr 012
Bricolage Grotesque

A warmer display option when examples need more texture.

Variable Axis Example

wght620

Use this pattern in MDX docs when explaining a variable axis without mounting the full chooser.


Copyable MDX Example

This section shows a complete interactive workbench and its import pattern together — the same pattern you would paste into your own MDX page.

Theme editor workbench
JSON theme / localStorage key: bazweave-theme-editor-themeidle
Export JSON
Technical role map
DisplayAa Rr 012Space Grotesk / variable / 300-700
HeadingAa Rr 012Space Grotesk / variable / 300-700
SubheadingAa Rr 012IBM Plex Sans / static / 400, 500
BodyAa Rr 012IBM Plex Sans / static / 400
ButtonAa Rr 012Space Grotesk / variable / 300-700
Technical specimen suite#09090b / #3b3b4f

Docs prose

Atlas pages need specimen-grade theme editing.

The normal RAGBAZ specimen combines prose, metadata, code-like labels, compact controls, and a product card in one view so theme decisions show their real consequences before they ship.

Review specimen suite

Product card

Bazweave Kit

Theme roles must survive cards, lists, badges, and short commercial copy without collapsing into one anonymous sans-serif layer.

mdxthemefont

Command panel

theme.apply({
  display: "var(--bt-font-display)",
  accent: "#3b3b4f",
  suite: "docs + card + form"
});

Buttons

Form controls

import { ThemeEditorWorkbench } from '@ragbaz/bazweave-theme/mdx';

<ThemeEditorWorkbench active="technical" />

Import Reference

// Theme presets + interactive workbench
import {
ThemeEditorWorkbench,
ThemeEditorTemplateDeck,
ThemeFontDependencyExample,
ThemeMdxExample,
ThemeRoleMatrix,
ThemeSpecimen,
ThemeSpecimenSuite,
} from '@ragbaz/bazweave-theme/mdx';

// Font chooser (for integrated specimens)
import {
FontChooserThemeDeck,
FontChooserSpecimen,
FontChooserFamilyMatrix,
FontChooserAxisExample,
} from '@ragbaz/bazweave-font/mdx';

See also: Font Chooser MDX Components — standalone font specimen and variable-axis demo page.