Saltar al contenido
CtrlK

ArdoTheme

En esta página
Esta referencia de la API se genera a partir de los comentarios de TypeScript en inglés. Los nombres, las firmas y los ejemplos corresponden al paquete publicado.

Themes the site: brand, accent, and neutral hues, saturation, callout hues, fonts, and any design token. It renders the CSS variables into a <style> element, so the theme is in the prerendered HTML. ArdoRoot renders it from its theme prop; a root built from ArdoLayout renders it itself.

import { ArdoTheme } from "ardo/ui"

<ArdoTheme />

Props

NameTypeRequiredDescription
colorArdoHueNoBrand hue for links, buttons, focus rings, and the hero. Default "berry".
accentArdoHueNoAccent hue for secondary highlights and code surfaces. Defaults to a complement of color.
neutralArdoHueNoHue of backgrounds, borders, text, header, and sidebar. Defaults to color.
chromanumber | { color?: number; accent?: number; neutral?: number }NoSaturation multipliers. 1 keeps Ardo's palette, 0.4 mutes it, and 0
turns a role gray. A number applies to color and accent.
statusArdoStatusHuesNoCallout hues; Ardo derives text, surface, and border for light and dark mode.
fonts{ body?: string; heading?: string; mono?: string }NoFont stacks. Load the fonts yourself, for example with Fontsource.
tokensArdoThemeTokensNoToken values for both color schemes, such as { radius: { base: "0.25rem" } }.
lightArdoThemeTokensNoToken values for light mode only.
darkArdoThemeTokensNoToken values for dark mode only.

Props type: ArdoThemeProps

Example

<ArdoTheme color="blue" neutral="slate" fonts={{ body: '"Inter Variable", system-ui' }} />