For AI agents: the complete documentation index is available at /apps-plugin/docs/llms.txt, the full documentation bundle is available at /apps-plugin/docs/llms-full.txt, and this page is available as Markdown at /apps-plugin/docs/components/theme/theme-provider.md.

theme-provider

主题配置组件,为其包裹的子组件统一指定豆包的浅色 / 深色模式。

只影响颜色相关的 CSS 变量,不涉及圆角、间距、字号等其他样式。

扫码预览

扫码预览 theme-provider

Props

属性名类型默认值必填说明
childrenReactNode-否子元素,会继承本组件设置的豆包主题颜色变量。
classNamestring-否容器类名
flattenbooleanfalse否是否展平容器 view。默认 false,因为该 view 需要作为 CSS 变量的作用域存在。
idstring-否容器 id
styleCSSProperties-否容器样式
themeTheme-否子树使用的主题。未传时跟随最近的上层 theme-provider;没有上层 theme-provider 时,跟随豆包当前主题。