Theming
Shared foundations, semantic roles and component recipes across your Exact application.
Choose a theme
Open Themes to preview Neutral, Indigo or Forest. Density, corners and typeface are independent from light, dark and system appearance. Copy theme exports a complete app.tamber configuration; the site uses this same public package API.
One configuration, shared components
Foundations hold base values. Semantic aliases describe their purpose, and component recipes inherit those roles. For example ui.foundation-radius feeds ui.radius-lg, then ui.radius-control and the compatible ui.radius alias. Change a foundation globally, or override a role or a typed component param deliberately. Circular indicators and flat joined edges keep their intentional shapes.
Tamber
tamber app
theme
ui.foundation-radius: length = 6px
ui.foundation-border-width: length = 2px
ui.foundation-space-unit: length = 0.875px
Generate a reusable configuration
The package exports a pure TypeScript helper. Write its output to app.tamber at setup or build time. A fixed theme needs no axes. Keep the Geist and Newsreader declarations in app.contract and copy their packaged font assets using the Installation guide. Set provide uiFont = "theme" at the app root to use the exported font. A runtime choice of "sans", "serif" or "mono" takes priority over that fixed font.
TypeScript
import { createTheme } from "@rightui/ui/theme"
const configuration = createTheme({
preset: "forest",
density: "compact",
radius: "sharp",
font: "serif",
})
// Write configuration to app.tamber.
Switch presets at runtime
createTheme({ interactive: true }) declares three application axes with 36 combinations. Fonts use the root uiFont provider independently, so all three fonts work with every palette, density and corner style. Light/dark/system uses setScheme separately. A subtree preview pins its modes using -exact-mode. Exact replaces a token and all its conditional branches when you override it: preserve the required branches in custom overrides.
Contract
state fontChoice = "sans" persist
provide
uiFont = fontChoice
action chooseForest
setMode("ui-preset", "forest")
setMode("ui-density", "compact")
setMode("ui-radius", "sharp")
fontChoice = "serif"
action useDarkAppearance
setScheme("dark")
What the theme controls
RightUI-owned controls, code surfaces, cards, examples and chart default palettes share theme tokens. Explicit chart data colors remain explicit. System menus, scrollbars, embedded media and the legacy host Markdown renderer have platform-owned appearance. MarkdownDocument provides a themeable AST renderer and parseMarkdown supports a documented subset; use the legacy Markdown component when you need its broader host syntax. The system accent uses the initial preset in an interactive design. See the package Theming and Markdown guides for exact boundaries.