kuzenbo-theme-runtime

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Kuzenbo 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.6
的外部应用代码。

Runtime Setup

运行时环境设置

  1. Install:
bash
npm install @kuzenbo/theme next-themes
  1. Load one prebuilt theme stylesheet at app root:
ts
import "@kuzenbo/theme/prebuilt/kuzenbo.css";
  1. Add bootstrap + provider in root layout:
tsx
import { ThemeBootstrapScript, ThemeProvider } from "@kuzenbo/theme";

<ThemeBootstrapScript />
<ThemeProvider>{children}</ThemeProvider>
  1. 安装:
bash
npm install @kuzenbo/theme next-themes
  1. 在应用根目录加载一个预构建主题样式表:
ts
import "@kuzenbo/theme/prebuilt/kuzenbo.css";
  1. 在根布局中添加引导脚本与ThemeProvider:
tsx
import { ThemeBootstrapScript, ThemeProvider } from "@kuzenbo/theme";

<ThemeBootstrapScript />
<ThemeProvider>{children}</ThemeProvider>

Theme Workflow

主题使用流程

  1. Pick a prebuilt theme from
    references/prebuilt-themes.md
    .
  2. Use semantic tokens from
    references/theme-token-families.md
    instead of hardcoded colors/z-index values.
  3. Override tokens in CSS (
    :root
    ,
    .dark
    , or scoped container) for customization.
  4. Use runtime helpers from
    references/theme-runtime-api.md
    only when custom bootstrap behavior is required.
  1. references/prebuilt-themes.md
    中选择一个预构建主题。
  2. 使用
    references/theme-token-families.md
    中的语义化Token,而非硬编码的颜色/z-index值。
  3. 在CSS中覆盖Token(
    :root
    .dark
    或作用域容器)以实现自定义。
  4. 仅在需要自定义引导行为时,使用
    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
    cursor-clickable
    and z-index tokens instead of ad-hoc cursor/z-index literals.
  • Keep imports on the public surface (
    @kuzenbo/theme
    ,
    @kuzenbo/theme/theme-provider
    ,
    @kuzenbo/theme/prebuilt/*.css
    ).
  • 确保每个Kuzenbo UI运行时都包含主题CSS导入和ThemeProvider配置。
  • 当存在语义化Token时,避免使用原始调色板类。
  • 优先使用
    cursor-clickable
    和z-index Token,而非临时的光标/z-index字面量。
  • 仅从公开入口导入(
    @kuzenbo/theme
    @kuzenbo/theme/theme-provider
    @kuzenbo/theme/prebuilt/*.css
    )。

References

参考文档

  • references/prebuilt-themes.md
  • references/theme-runtime-api.md
  • references/theme-token-families.md
  • references/prebuilt-themes.md
  • references/theme-runtime-api.md
  • references/theme-token-families.md