主题切换

通过 ConfigProvider.theme.algorithm 切换 admin / brand / dark,底层为 data-theme + CSS Variables。可用 theme.tokens 覆盖部分 Token。

  • admin:中性后台亮色;文档站暗色时切到 dark
  • brand:营销气质;默认亮色面(深字);暗色宿主(html.darktheme.colorScheme: 'dark')走 brand 暗色面(浅字 + 暖金)
  • dark:后台暗色

文档站组件 Demo 跟随 Rspress 明暗(DocsDemoProvider)。本页示例为主动示教三种 algorithm,不跟随文档站开关。

<ConfigProvider theme={{ algorithm: 'brand', colorScheme: 'light' }}>
  <Button>Brand</Button>
</ConfigProvider>

现场示例

admin
ON THIS PAGE