kuzenbo-theme-runtime
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseKuzenbo Theme Runtime
Kuzenbo Theme 运行时环境
Use this skill for external app code that consumes the stable public package .
@kuzenbo/theme@0.0.6本技能适用于使用稳定公开包的外部应用代码。
@kuzenbo/theme@0.0.6Runtime Setup
运行时环境设置
- Install:
bash
npm install @kuzenbo/theme next-themes- Load one prebuilt theme stylesheet at app root:
ts
import "@kuzenbo/theme/prebuilt/kuzenbo.css";- Add bootstrap + provider in root layout:
tsx
import { ThemeBootstrapScript, ThemeProvider } from "@kuzenbo/theme";
<ThemeBootstrapScript />
<ThemeProvider>{children}</ThemeProvider>- 安装:
bash
npm install @kuzenbo/theme next-themes- 在应用根目录加载一个预构建主题样式表:
ts
import "@kuzenbo/theme/prebuilt/kuzenbo.css";- 在根布局中添加引导脚本与ThemeProvider:
tsx
import { ThemeBootstrapScript, ThemeProvider } from "@kuzenbo/theme";
<ThemeBootstrapScript />
<ThemeProvider>{children}</ThemeProvider>Theme Workflow
主题使用流程
- Pick a prebuilt theme from .
references/prebuilt-themes.md - Use semantic tokens from instead of hardcoded colors/z-index values.
references/theme-token-families.md - Override tokens in CSS (,
:root, or scoped container) for customization..dark - Use runtime helpers from only when custom bootstrap behavior is required.
references/theme-runtime-api.md
- 从中选择一个预构建主题。
references/prebuilt-themes.md - 使用中的语义化Token,而非硬编码的颜色/z-index值。
references/theme-token-families.md - 在CSS中覆盖Token(、
:root或作用域容器)以实现自定义。.dark - 仅在需要自定义引导行为时,使用中的运行时工具。
references/theme-runtime-api.md
Guardrails
注意事项
- Keep theme CSS import and provider wiring in every Kuzenbo UI runtime.
- Avoid raw palette classes when a semantic token exists.
- Prefer and z-index tokens instead of ad-hoc cursor/z-index literals.
cursor-clickable - Keep imports on the public surface (,
@kuzenbo/theme,@kuzenbo/theme/theme-provider).@kuzenbo/theme/prebuilt/*.css
- 确保每个Kuzenbo UI运行时都包含主题CSS导入和ThemeProvider配置。
- 当存在语义化Token时,避免使用原始调色板类。
- 优先使用和z-index Token,而非临时的光标/z-index字面量。
cursor-clickable - 仅从公开入口导入(、
@kuzenbo/theme、@kuzenbo/theme/theme-provider)。@kuzenbo/theme/prebuilt/*.css
References
参考文档
references/prebuilt-themes.mdreferences/theme-runtime-api.mdreferences/theme-token-families.md
references/prebuilt-themes.mdreferences/theme-runtime-api.mdreferences/theme-token-families.md