interface-craft

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Interface Craft

Interface Craft

By Josh Puckett
A toolkit for building polished, animated interfaces. Write animations you can read like a script, then tune them with live controls.

作者:Josh Puckett
一款用于构建精致动画界面的工具包。你可以像编写脚本一样编写动画,然后通过实时控件进行调整。

Skills

技能

SkillWhen to UseInvoke
Storyboard AnimationWriting or refactoring multi-stage animations into a human-readable DSL
/interface-craft storyboard
or describe an animation
DialKitAdding live control panels to tune animation/style values
/interface-craft dialkit
or mention dials/sliders/controls
Design CritiqueSystematic UI critique of a screenshot, component, or page
/interface-craft critique
or paste a screenshot for review
技能适用场景调用方式
Storyboard Animation将多阶段动画编写或重构为易读的DSL
/interface-craft storyboard
或描述动画需求
DialKit添加实时控制面板以调整动画/样式数值
/interface-craft dialkit
或提及旋钮/滑块/控件
Design Critique对截图、组件或页面进行系统化UI评审
/interface-craft critique
或粘贴截图进行评审

Quick Start

快速开始

Storyboard Animation

Storyboard Animation

Turn any animation into a readable storyboard with named timing, config objects, and stage-driven sequencing:
tsx
/* ─────────────────────────────────────────────────────────
 * ANIMATION STORYBOARD
 *
 *    0ms   waiting for scroll into view
 *  300ms   card fades in, scale 0.85 → 1.0
 *  900ms   heading highlights
 * 1500ms   rows slide up (staggered 200ms)
 * ───────────────────────────────────────────────────────── */

const TIMING = {
  cardAppear:  300,   // card fades in
  heading:     900,   // heading highlights
  rows:        1500,  // rows start staggering
};
See storyboard-animation.md for the full pattern spec.
将任意动画转换为包含命名时序、配置对象和阶段驱动序列的易读故事板:
tsx
/* ─────────────────────────────────────────────────────────
 * ANIMATION STORYBOARD
 *
 *    0ms   等待滚动进入视图
 *  300ms   卡片淡入,缩放从0.85 → 1.0
 *  900ms   标题高亮
 * 1500ms   行向上滑动(交错200ms)
 * ───────────────────────────────────────────────────────── */

const TIMING = {
  cardAppear:  300,   // 卡片淡入
  heading:     900,   // 标题高亮
  rows:        1500,  // 行开始交错
};
查看storyboard-animation.md获取完整的模式规范。

DialKit

DialKit

Generate live control panels for tuning values in real time:
tsx
const params = useDialKit('Card', {
  scale: [1, 0.5, 2],
  blur: [0, 0, 100],
  spring: { type: 'spring', visualDuration: 0.3, bounce: 0.2 },
})
See dialkit.md for all control types and patterns.
生成实时控制面板以实时调整数值:
tsx
const params = useDialKit('Card', {
  scale: [1, 0.5, 2],
  blur: [0, 0, 100],
  spring: { type: 'spring', visualDuration: 0.3, bounce: 0.2 },
})
查看dialkit.md获取所有控件类型和模式。

Sub-Skill Routing

子技能路由

When the user invokes
/interface-craft
:
  1. With
    storyboard
    argument or animation-related context
    → Load and follow storyboard-animation.md
  2. With
    dialkit
    argument or control-panel-related context
    → Load and follow dialkit.md
  3. With
    critique
    argument, a pasted image, or review-related context
    → Load and follow design-critique.md
  4. With a file path → Read the file, detect whether it needs storyboard refactoring, dialkit controls, or a design critique, and apply the appropriate skill
  5. With a plain-English description of an animation → Use storyboard-animation to write it
  6. Ambiguous → Ask which skill to use
当用户调用
/interface-craft
时:
  1. 携带
    storyboard
    参数或动画相关上下文
    → 加载并遵循storyboard-animation.md
  2. 携带
    dialkit
    参数或控制面板相关上下文
    → 加载并遵循dialkit.md
  3. 携带
    critique
    参数、粘贴的图片或评审相关上下文
    → 加载并遵循design-critique.md
  4. 携带文件路径 → 读取文件,检测其是否需要Storyboard重构、DialKit控件或设计评审,然后应用相应技能
  5. 携带动画的自然语言描述 → 使用Storyboard Animation编写动画
  6. 模糊请求 → 询问用户需要使用哪项技能

Design Principles

设计原则

  1. Readable over clever — Anyone should be able to scan the top of a file and understand the animation sequence without reading implementation code
  2. Tunable by default — Every value that affects timing or appearance should be a named constant, trivially adjustable
  3. Data-driven — Repeated elements use arrays and
    .map()
    , not copy-pasted blocks
  4. Stage-driven — A single integer state drives the entire sequence; no scattered boolean flags
  5. Spring-first — Prefer spring physics over duration-based easing for natural motion
  1. 可读性优先于技巧性 — 任何人都应该能够扫描文件顶部并理解动画序列,而无需阅读实现代码
  2. 默认支持可调性 — 所有影响时序或外观的数值都应是命名常量,可轻松调整
  3. 数据驱动 — 重复元素使用数组和
    .map()
    ,而非复制粘贴的代码块
  4. 阶段驱动 — 单个整数状态驱动整个序列;无分散的布尔标志
  5. 优先使用弹簧物理 — 相比基于时长的缓动,更倾向于使用弹簧物理实现自然动效