Font Chooser MDX Components
Font Chooser
Variable-font specimen deck, family matrix, axis examples, and interactive theme previews — usable in Docusaurus and other MDX hosts without mounting the full Next.js chooser.
These examples use the RAGBAZ sub-theme direction with Intel One Mono for command/data surfaces and a clean neo-grotesque layer for readable prose. The font chooser provides MDX-safe components that let documentation pages show live font specimens, compare families, and explain variable axes.
Live Theme Deck
The theme deck lets readers switch between four background surfaces and see how font specimens read in each context.
Click a theme card to update the specimen. Each theme controls the background surface for font previews:
| Theme | ID | Style | Accent |
|---|---|---|---|
| Slate | slate | Warm gruvbox-dark | #f3c46c |
| Elegant | elegant | Low-gloss amber dark | #e2a55f |
| Tufte | tufte | Paper-proof light | #9d5b1d |
| Formal | formal | Executive dark | #f3c46c |
Custom Specimens
The FontChooserSpecimen component accepts theme, family, label,
text, and size props, making it suitable for inline use in prose-heavy
documentation.
Text Scale Comparison
Family Matrix
Use the family matrix when documenting the base pairing rules across the three RAGBAZ font families.
RAGBAZ control labels, code, axis values, and compact technical copy.
Neutral reading layer for Docusaurus pages, product UI, and long examples.
A warmer display option when examples need more texture.
Variable Axis Examples
For pages that teach variable font controls, use a compact axis strip rather than mounting the full chooser.
620Use this pattern in MDX docs when explaining a variable axis without mounting the full chooser.
48Use this pattern in MDX docs when explaining a variable axis without mounting the full chooser.
85Use this pattern in MDX docs when explaining a variable axis without mounting the full chooser.
Copyable MDX Example
This component demonstrates how an MDX page can expose an interactive sample and a copyable import pattern together.
import { FontChooserThemeDeck } from '@ragbaz/bazweave-font/mdx';
<FontChooserThemeDeck active="slate" />Font Catalog
The built-in catalog includes 16 Google Fonts across 4 categories:
| Category | Fonts |
|---|---|
| Sans-serif | Inter, Roboto Flex, Bricolage Grotesque, Commissioner, Manrope, Space Grotesk, Sora, Outfit |
| Serif | Fraunces, Playfair Display, Cormorant Garamond, DM Serif Display |
| Monospace | Space Mono, IBM Plex Mono |
| Handwriting | Dancing Script, Caveat |
Import Reference
import {
FontChooserThemeDeck,
FontChooserSpecimen,
FontChooserFamilyMatrix,
FontChooserAxisExample,
FontChooserMdxExample,
} from '@ragbaz/bazweave-font/mdx';
See also: Theme Editor MDX Components — typography presets, interactive workbench, and full-surface specimen suites.