Skip to content
全部能力
设计系统packages/design/theme

theme 能力包

纯 CSS 多 theme 引擎 — 六套 oklch preset,通过 data-theme 切换;关键路径无 JS。

打开文档
稳定性
稳定
作用域
全局
边界
packages/design/theme
themepackages/design/theme
设计系统
brand-primary
brand-accent
brand-gradient
radius-sm
radius-md
radius-lg

Tokens 数

441

组件

106

覆盖率

94%

同步状态

OK

packages/design/theme设计供应链
使用方式theme.tsx
typescript
theme.tsx
1import { ThemeProvider } from "@nebutra/tokens";
2
3export function RootLayout({ children }: { children: React.ReactNode }) {
4  return (
5    <html suppressHydrationWarning>
6      <body>
7        <ThemeProvider attribute="class" defaultTheme="system" enableSystem>
8          {children}
9        </ThemeProvider>
10      </body>
11    </html>
12  );
13}