18 个交互实验

动效实验室

就地调整演示参数,再把交互代码复制到你的项目。

边框流光

调整沿卡片边缘移动的光线速度。

部署 可以发布
代码与 AI 提示词
.studio {
  --stage: #edf1f8;
  --stage-border: #c7d1e4;
  --stage-ink: #172740;
  --stage-muted: #455976;
  --stage-tile: #ffffff;
  --stage-accent: #254fc2;
  --stage-accent-wash: #dce6ff;
  --stage-green: #14765d;
  --stage-ease: cubic-bezier(.23, 1, .32, 1);
  color: var(--stage-ink);
  background: var(--stage-tile);
  border-radius: inherit;
}
[data-theme="dark"] .studio, [data-stage="dark"].studio {
  --stage: #141a27;
  --stage-border: #35425e;
  --stage-ink: #f1f5ff;
  --stage-muted: #aebbd5;
  --stage-tile: #202a3d;
  --stage-accent: #a5baff;
  --stage-accent-wash: #2b3b64;
  --stage-green: #70dfbb;
}
.studio-stage {
  min-height: 164px;
  display: grid;
  place-items: center;
  padding: 13px;
  isolation: isolate;
  overflow: clip;
  border-radius: 7px;
  background: radial-gradient(circle, color-mix(in srgb, var(--stage-accent), transparent 76%) .65px, transparent 1px) center / 13px 13px, var(--stage);
}
.studio:has(.studio-controls) .studio-stage { border-end-start-radius: 0; border-end-end-radius: 0; }
.studio-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 14px;
  min-height: 49px;
  padding: 6px 12px;
  border-top: 1px solid var(--stage-border);
}
.studio-controls label {
  min-width: 165px;
  flex: 1;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  font-size: .74rem;
}
.studio-controls output { color: var(--stage-muted); font: .73rem ui-monospace, monospace; }
.studio-controls input { grid-column: 1/-1; margin: 0; width: 100%; accent-color: var(--stage-accent); }
.studio-action, .studio-cta {
  padding: 5px 10px;
  min-height: 34px;
  border-radius: 7px;
  border: 1px solid var(--stage-border);
  background: var(--stage-tile);
  color: var(--stage-ink);
  font: 600 .78rem/1.3 system-ui, sans-serif;
  cursor: pointer;
  transition: transform 145ms var(--stage-ease), background-color 145ms;
}
.studio :is(button, input, [tabindex]):focus-visible { outline: 2px solid var(--stage-accent); outline-offset: 2px; }
.studio-action:active, .studio-cta:active { transform: scale(.97); }
.studio-cta { background: var(--stage-accent); border-color: transparent; color: var(--stage); }
.studio-object {
  position: relative;
  width: min(250px, 100%);
  display: grid;
  gap: 5px;
  justify-items: start;
  text-align: start;
  padding: 14px 17px;
  color: var(--stage-ink);
  background: var(--stage-tile);
  border: 1px solid var(--stage-border);
  border-radius: 12px;
  box-shadow: 0 9px 20px color-mix(in srgb, #071639, transparent 88%);
}
.studio-object strong { font-size: 1.24rem; line-height: 1.15; letter-spacing: -.035em; }
.studio-object small, .studio-object > span:not(.studio-chip) { color: var(--stage-muted); font-size: .72rem; }
.studio-live { display: inline-block; inline-size: 7px; block-size: 7px; border-radius: 50%; background: var(--stage-green); vertical-align: .12em; }
.studio-scroll {
  width: min(100%, 350px);
  height: 136px;
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: var(--stage-border) var(--stage);
  border: 1px solid var(--stage-border);
  border-radius: 8px;
  background: var(--stage-tile);
}
.studio-scroll-story { height: 285px; }
.studio-pin { position: sticky; top: 0; height: 132px; display: grid; place-items: center; padding: 10px; }
.studio:not([data-visible="true"]) * { animation-play-state: paused; }
@media (prefers-reduced-motion: reduce) {
  .studio *, .studio *::before, .studio *::after { animation: none !important; transition: none !important; }
}

/* specimen */
.studio-beam-box { min-height: 94px; align-content: center; }
.studio-beam-box svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; filter: drop-shadow(0 0 4px #698aff80); pointer-events: none; }
.studio-beam-box rect { stroke-dasharray: 21 79; animation: studio-lap var(--duration, 4s) linear infinite; }
@keyframes studio-lap { to { stroke-dashoffset: -100; } }

3D 倾斜卡片

在卡片上移动指针,观察倾斜角度和高光变化。

通行卡工作室通行证
代码与 AI 提示词
.studio {
  --stage: #edf1f8;
  --stage-border: #c7d1e4;
  --stage-ink: #172740;
  --stage-muted: #455976;
  --stage-tile: #ffffff;
  --stage-accent: #254fc2;
  --stage-accent-wash: #dce6ff;
  --stage-green: #14765d;
  --stage-ease: cubic-bezier(.23, 1, .32, 1);
  color: var(--stage-ink);
  background: var(--stage-tile);
  border-radius: inherit;
}
[data-theme="dark"] .studio, [data-stage="dark"].studio {
  --stage: #141a27;
  --stage-border: #35425e;
  --stage-ink: #f1f5ff;
  --stage-muted: #aebbd5;
  --stage-tile: #202a3d;
  --stage-accent: #a5baff;
  --stage-accent-wash: #2b3b64;
  --stage-green: #70dfbb;
}
.studio-stage {
  min-height: 164px;
  display: grid;
  place-items: center;
  padding: 13px;
  isolation: isolate;
  overflow: clip;
  border-radius: 7px;
  background: radial-gradient(circle, color-mix(in srgb, var(--stage-accent), transparent 76%) .65px, transparent 1px) center / 13px 13px, var(--stage);
}
.studio:has(.studio-controls) .studio-stage { border-end-start-radius: 0; border-end-end-radius: 0; }
.studio-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 14px;
  min-height: 49px;
  padding: 6px 12px;
  border-top: 1px solid var(--stage-border);
}
.studio-controls label {
  min-width: 165px;
  flex: 1;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  font-size: .74rem;
}
.studio-controls output { color: var(--stage-muted); font: .73rem ui-monospace, monospace; }
.studio-controls input { grid-column: 1/-1; margin: 0; width: 100%; accent-color: var(--stage-accent); }
.studio-action, .studio-cta {
  padding: 5px 10px;
  min-height: 34px;
  border-radius: 7px;
  border: 1px solid var(--stage-border);
  background: var(--stage-tile);
  color: var(--stage-ink);
  font: 600 .78rem/1.3 system-ui, sans-serif;
  cursor: pointer;
  transition: transform 145ms var(--stage-ease), background-color 145ms;
}
.studio :is(button, input, [tabindex]):focus-visible { outline: 2px solid var(--stage-accent); outline-offset: 2px; }
.studio-action:active, .studio-cta:active { transform: scale(.97); }
.studio-cta { background: var(--stage-accent); border-color: transparent; color: var(--stage); }
.studio-object {
  position: relative;
  width: min(250px, 100%);
  display: grid;
  gap: 5px;
  justify-items: start;
  text-align: start;
  padding: 14px 17px;
  color: var(--stage-ink);
  background: var(--stage-tile);
  border: 1px solid var(--stage-border);
  border-radius: 12px;
  box-shadow: 0 9px 20px color-mix(in srgb, #071639, transparent 88%);
}
.studio-object strong { font-size: 1.24rem; line-height: 1.15; letter-spacing: -.035em; }
.studio-object small, .studio-object > span:not(.studio-chip) { color: var(--stage-muted); font-size: .72rem; }
.studio-live { display: inline-block; inline-size: 7px; block-size: 7px; border-radius: 50%; background: var(--stage-green); vertical-align: .12em; }
.studio-scroll {
  width: min(100%, 350px);
  height: 136px;
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: var(--stage-border) var(--stage);
  border: 1px solid var(--stage-border);
  border-radius: 8px;
  background: var(--stage-tile);
}
.studio-scroll-story { height: 285px; }
.studio-pin { position: sticky; top: 0; height: 132px; display: grid; place-items: center; padding: 10px; }
.studio:not([data-visible="true"]) * { animation-play-state: paused; }
@media (prefers-reduced-motion: reduce) {
  .studio *, .studio *::before, .studio *::after { animation: none !important; transition: none !important; }
}

/* specimen */
.studio-tilt-zone { display: grid; place-items: center; width: min(100%, 290px); height: 137px; }
.studio-tilt-card { overflow: hidden; background: linear-gradient(145deg, var(--stage-accent-wash), var(--stage-tile)); transition: transform 220ms var(--stage-ease); }
.studio-tilt-card::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(125px at var(--x, 20%) var(--y, 12%), #fff7, transparent 80%);
}
.studio-chip { color: var(--stage-accent); font-size: 1.25rem; line-height: 1; margin-bottom: 3px; }
[data-theme="dark"] .studio-tilt-card::after { opacity: .45; }

数字滚动计数

重播计数动效,观察等宽数字如何保持指标位置稳定。

月度收入$48,250↑ 12.4%
代码与 AI 提示词
.studio {
  --stage: #edf1f8;
  --stage-border: #c7d1e4;
  --stage-ink: #172740;
  --stage-muted: #455976;
  --stage-tile: #ffffff;
  --stage-accent: #254fc2;
  --stage-accent-wash: #dce6ff;
  --stage-green: #14765d;
  --stage-ease: cubic-bezier(.23, 1, .32, 1);
  color: var(--stage-ink);
  background: var(--stage-tile);
  border-radius: inherit;
}
[data-theme="dark"] .studio, [data-stage="dark"].studio {
  --stage: #141a27;
  --stage-border: #35425e;
  --stage-ink: #f1f5ff;
  --stage-muted: #aebbd5;
  --stage-tile: #202a3d;
  --stage-accent: #a5baff;
  --stage-accent-wash: #2b3b64;
  --stage-green: #70dfbb;
}
.studio-stage {
  min-height: 164px;
  display: grid;
  place-items: center;
  padding: 13px;
  isolation: isolate;
  overflow: clip;
  border-radius: 7px;
  background: radial-gradient(circle, color-mix(in srgb, var(--stage-accent), transparent 76%) .65px, transparent 1px) center / 13px 13px, var(--stage);
}
.studio:has(.studio-controls) .studio-stage { border-end-start-radius: 0; border-end-end-radius: 0; }
.studio-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 14px;
  min-height: 49px;
  padding: 6px 12px;
  border-top: 1px solid var(--stage-border);
}
.studio-controls label {
  min-width: 165px;
  flex: 1;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  font-size: .74rem;
}
.studio-controls output { color: var(--stage-muted); font: .73rem ui-monospace, monospace; }
.studio-controls input { grid-column: 1/-1; margin: 0; width: 100%; accent-color: var(--stage-accent); }
.studio-action, .studio-cta {
  padding: 5px 10px;
  min-height: 34px;
  border-radius: 7px;
  border: 1px solid var(--stage-border);
  background: var(--stage-tile);
  color: var(--stage-ink);
  font: 600 .78rem/1.3 system-ui, sans-serif;
  cursor: pointer;
  transition: transform 145ms var(--stage-ease), background-color 145ms;
}
.studio :is(button, input, [tabindex]):focus-visible { outline: 2px solid var(--stage-accent); outline-offset: 2px; }
.studio-action:active, .studio-cta:active { transform: scale(.97); }
.studio-cta { background: var(--stage-accent); border-color: transparent; color: var(--stage); }
.studio-object {
  position: relative;
  width: min(250px, 100%);
  display: grid;
  gap: 5px;
  justify-items: start;
  text-align: start;
  padding: 14px 17px;
  color: var(--stage-ink);
  background: var(--stage-tile);
  border: 1px solid var(--stage-border);
  border-radius: 12px;
  box-shadow: 0 9px 20px color-mix(in srgb, #071639, transparent 88%);
}
.studio-object strong { font-size: 1.24rem; line-height: 1.15; letter-spacing: -.035em; }
.studio-object small, .studio-object > span:not(.studio-chip) { color: var(--stage-muted); font-size: .72rem; }
.studio-live { display: inline-block; inline-size: 7px; block-size: 7px; border-radius: 50%; background: var(--stage-green); vertical-align: .12em; }
.studio-scroll {
  width: min(100%, 350px);
  height: 136px;
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: var(--stage-border) var(--stage);
  border: 1px solid var(--stage-border);
  border-radius: 8px;
  background: var(--stage-tile);
}
.studio-scroll-story { height: 285px; }
.studio-pin { position: sticky; top: 0; height: 132px; display: grid; place-items: center; padding: 10px; }
.studio:not([data-visible="true"]) * { animation-play-state: paused; }
@media (prefers-reduced-motion: reduce) {
  .studio *, .studio *::before, .studio *::after { animation: none !important; transition: none !important; }
}

/* specimen */
.studio-metric strong { font-size: 2.15rem; font-variant-numeric: tabular-nums; }
.studio-metric > .studio-up { color: var(--stage-green); font: 600 .75rem ui-monospace, monospace; }

字符解码

悬停或点击「解码」,观察乱码如何变成可读文字。

终端信号就绪
代码与 AI 提示词
.studio {
  --stage: #edf1f8;
  --stage-border: #c7d1e4;
  --stage-ink: #172740;
  --stage-muted: #455976;
  --stage-tile: #ffffff;
  --stage-accent: #254fc2;
  --stage-accent-wash: #dce6ff;
  --stage-green: #14765d;
  --stage-ease: cubic-bezier(.23, 1, .32, 1);
  color: var(--stage-ink);
  background: var(--stage-tile);
  border-radius: inherit;
}
[data-theme="dark"] .studio, [data-stage="dark"].studio {
  --stage: #141a27;
  --stage-border: #35425e;
  --stage-ink: #f1f5ff;
  --stage-muted: #aebbd5;
  --stage-tile: #202a3d;
  --stage-accent: #a5baff;
  --stage-accent-wash: #2b3b64;
  --stage-green: #70dfbb;
}
.studio-stage {
  min-height: 164px;
  display: grid;
  place-items: center;
  padding: 13px;
  isolation: isolate;
  overflow: clip;
  border-radius: 7px;
  background: radial-gradient(circle, color-mix(in srgb, var(--stage-accent), transparent 76%) .65px, transparent 1px) center / 13px 13px, var(--stage);
}
.studio:has(.studio-controls) .studio-stage { border-end-start-radius: 0; border-end-end-radius: 0; }
.studio-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 14px;
  min-height: 49px;
  padding: 6px 12px;
  border-top: 1px solid var(--stage-border);
}
.studio-controls label {
  min-width: 165px;
  flex: 1;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  font-size: .74rem;
}
.studio-controls output { color: var(--stage-muted); font: .73rem ui-monospace, monospace; }
.studio-controls input { grid-column: 1/-1; margin: 0; width: 100%; accent-color: var(--stage-accent); }
.studio-action, .studio-cta {
  padding: 5px 10px;
  min-height: 34px;
  border-radius: 7px;
  border: 1px solid var(--stage-border);
  background: var(--stage-tile);
  color: var(--stage-ink);
  font: 600 .78rem/1.3 system-ui, sans-serif;
  cursor: pointer;
  transition: transform 145ms var(--stage-ease), background-color 145ms;
}
.studio :is(button, input, [tabindex]):focus-visible { outline: 2px solid var(--stage-accent); outline-offset: 2px; }
.studio-action:active, .studio-cta:active { transform: scale(.97); }
.studio-cta { background: var(--stage-accent); border-color: transparent; color: var(--stage); }
.studio-object {
  position: relative;
  width: min(250px, 100%);
  display: grid;
  gap: 5px;
  justify-items: start;
  text-align: start;
  padding: 14px 17px;
  color: var(--stage-ink);
  background: var(--stage-tile);
  border: 1px solid var(--stage-border);
  border-radius: 12px;
  box-shadow: 0 9px 20px color-mix(in srgb, #071639, transparent 88%);
}
.studio-object strong { font-size: 1.24rem; line-height: 1.15; letter-spacing: -.035em; }
.studio-object small, .studio-object > span:not(.studio-chip) { color: var(--stage-muted); font-size: .72rem; }
.studio-live { display: inline-block; inline-size: 7px; block-size: 7px; border-radius: 50%; background: var(--stage-green); vertical-align: .12em; }
.studio-scroll {
  width: min(100%, 350px);
  height: 136px;
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: var(--stage-border) var(--stage);
  border: 1px solid var(--stage-border);
  border-radius: 8px;
  background: var(--stage-tile);
}
.studio-scroll-story { height: 285px; }
.studio-pin { position: sticky; top: 0; height: 132px; display: grid; place-items: center; padding: 10px; }
.studio:not([data-visible="true"]) * { animation-play-state: paused; }
@media (prefers-reduced-motion: reduce) {
  .studio *, .studio *::before, .studio *::after { animation: none !important; transition: none !important; }
}

/* specimen */
.studio-decode strong { color: var(--stage-accent); font: 600 clamp(.9rem, 4vw, 1.28rem) ui-monospace, monospace; letter-spacing: .09em; }

磁吸按钮

把指针移到按钮附近,调整磁吸力度。

代码与 AI 提示词
.studio {
  --stage: #edf1f8;
  --stage-border: #c7d1e4;
  --stage-ink: #172740;
  --stage-muted: #455976;
  --stage-tile: #ffffff;
  --stage-accent: #254fc2;
  --stage-accent-wash: #dce6ff;
  --stage-green: #14765d;
  --stage-ease: cubic-bezier(.23, 1, .32, 1);
  color: var(--stage-ink);
  background: var(--stage-tile);
  border-radius: inherit;
}
[data-theme="dark"] .studio, [data-stage="dark"].studio {
  --stage: #141a27;
  --stage-border: #35425e;
  --stage-ink: #f1f5ff;
  --stage-muted: #aebbd5;
  --stage-tile: #202a3d;
  --stage-accent: #a5baff;
  --stage-accent-wash: #2b3b64;
  --stage-green: #70dfbb;
}
.studio-stage {
  min-height: 164px;
  display: grid;
  place-items: center;
  padding: 13px;
  isolation: isolate;
  overflow: clip;
  border-radius: 7px;
  background: radial-gradient(circle, color-mix(in srgb, var(--stage-accent), transparent 76%) .65px, transparent 1px) center / 13px 13px, var(--stage);
}
.studio:has(.studio-controls) .studio-stage { border-end-start-radius: 0; border-end-end-radius: 0; }
.studio-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 14px;
  min-height: 49px;
  padding: 6px 12px;
  border-top: 1px solid var(--stage-border);
}
.studio-controls label {
  min-width: 165px;
  flex: 1;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  font-size: .74rem;
}
.studio-controls output { color: var(--stage-muted); font: .73rem ui-monospace, monospace; }
.studio-controls input { grid-column: 1/-1; margin: 0; width: 100%; accent-color: var(--stage-accent); }
.studio-action, .studio-cta {
  padding: 5px 10px;
  min-height: 34px;
  border-radius: 7px;
  border: 1px solid var(--stage-border);
  background: var(--stage-tile);
  color: var(--stage-ink);
  font: 600 .78rem/1.3 system-ui, sans-serif;
  cursor: pointer;
  transition: transform 145ms var(--stage-ease), background-color 145ms;
}
.studio :is(button, input, [tabindex]):focus-visible { outline: 2px solid var(--stage-accent); outline-offset: 2px; }
.studio-action:active, .studio-cta:active { transform: scale(.97); }
.studio-cta { background: var(--stage-accent); border-color: transparent; color: var(--stage); }
.studio-object {
  position: relative;
  width: min(250px, 100%);
  display: grid;
  gap: 5px;
  justify-items: start;
  text-align: start;
  padding: 14px 17px;
  color: var(--stage-ink);
  background: var(--stage-tile);
  border: 1px solid var(--stage-border);
  border-radius: 12px;
  box-shadow: 0 9px 20px color-mix(in srgb, #071639, transparent 88%);
}
.studio-object strong { font-size: 1.24rem; line-height: 1.15; letter-spacing: -.035em; }
.studio-object small, .studio-object > span:not(.studio-chip) { color: var(--stage-muted); font-size: .72rem; }
.studio-live { display: inline-block; inline-size: 7px; block-size: 7px; border-radius: 50%; background: var(--stage-green); vertical-align: .12em; }
.studio-scroll {
  width: min(100%, 350px);
  height: 136px;
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: var(--stage-border) var(--stage);
  border: 1px solid var(--stage-border);
  border-radius: 8px;
  background: var(--stage-tile);
}
.studio-scroll-story { height: 285px; }
.studio-pin { position: sticky; top: 0; height: 132px; display: grid; place-items: center; padding: 10px; }
.studio:not([data-visible="true"]) * { animation-play-state: paused; }
@media (prefers-reduced-motion: reduce) {
  .studio *, .studio *::before, .studio *::after { animation: none !important; transition: none !important; }
}

/* specimen */
.studio-magnet-zone { position: relative; width: min(100%, 275px); min-height: 126px; display: grid; place-items: center; }
.studio-magnet-zone button { min-height: 43px; padding-inline: 17px; border-radius: 99px; }
.studio-magnet-zone button span { margin-inline-start: 5px; }
.studio-magnet-zone output { position: absolute; bottom: 6px; color: var(--stage-muted); font-size: .75rem; }

聚光灯卡片

移动指针,观察光斑掠过卡片表面和边框。

工作区夜间工作指针聚光灯
代码与 AI 提示词
.studio {
  --stage: #edf1f8;
  --stage-border: #c7d1e4;
  --stage-ink: #172740;
  --stage-muted: #455976;
  --stage-tile: #ffffff;
  --stage-accent: #254fc2;
  --stage-accent-wash: #dce6ff;
  --stage-green: #14765d;
  --stage-ease: cubic-bezier(.23, 1, .32, 1);
  color: var(--stage-ink);
  background: var(--stage-tile);
  border-radius: inherit;
}
[data-theme="dark"] .studio, [data-stage="dark"].studio {
  --stage: #141a27;
  --stage-border: #35425e;
  --stage-ink: #f1f5ff;
  --stage-muted: #aebbd5;
  --stage-tile: #202a3d;
  --stage-accent: #a5baff;
  --stage-accent-wash: #2b3b64;
  --stage-green: #70dfbb;
}
.studio-stage {
  min-height: 164px;
  display: grid;
  place-items: center;
  padding: 13px;
  isolation: isolate;
  overflow: clip;
  border-radius: 7px;
  background: radial-gradient(circle, color-mix(in srgb, var(--stage-accent), transparent 76%) .65px, transparent 1px) center / 13px 13px, var(--stage);
}
.studio:has(.studio-controls) .studio-stage { border-end-start-radius: 0; border-end-end-radius: 0; }
.studio-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 14px;
  min-height: 49px;
  padding: 6px 12px;
  border-top: 1px solid var(--stage-border);
}
.studio-controls label {
  min-width: 165px;
  flex: 1;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  font-size: .74rem;
}
.studio-controls output { color: var(--stage-muted); font: .73rem ui-monospace, monospace; }
.studio-controls input { grid-column: 1/-1; margin: 0; width: 100%; accent-color: var(--stage-accent); }
.studio-action, .studio-cta {
  padding: 5px 10px;
  min-height: 34px;
  border-radius: 7px;
  border: 1px solid var(--stage-border);
  background: var(--stage-tile);
  color: var(--stage-ink);
  font: 600 .78rem/1.3 system-ui, sans-serif;
  cursor: pointer;
  transition: transform 145ms var(--stage-ease), background-color 145ms;
}
.studio :is(button, input, [tabindex]):focus-visible { outline: 2px solid var(--stage-accent); outline-offset: 2px; }
.studio-action:active, .studio-cta:active { transform: scale(.97); }
.studio-cta { background: var(--stage-accent); border-color: transparent; color: var(--stage); }
.studio-object {
  position: relative;
  width: min(250px, 100%);
  display: grid;
  gap: 5px;
  justify-items: start;
  text-align: start;
  padding: 14px 17px;
  color: var(--stage-ink);
  background: var(--stage-tile);
  border: 1px solid var(--stage-border);
  border-radius: 12px;
  box-shadow: 0 9px 20px color-mix(in srgb, #071639, transparent 88%);
}
.studio-object strong { font-size: 1.24rem; line-height: 1.15; letter-spacing: -.035em; }
.studio-object small, .studio-object > span:not(.studio-chip) { color: var(--stage-muted); font-size: .72rem; }
.studio-live { display: inline-block; inline-size: 7px; block-size: 7px; border-radius: 50%; background: var(--stage-green); vertical-align: .12em; }
.studio-scroll {
  width: min(100%, 350px);
  height: 136px;
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: var(--stage-border) var(--stage);
  border: 1px solid var(--stage-border);
  border-radius: 8px;
  background: var(--stage-tile);
}
.studio-scroll-story { height: 285px; }
.studio-pin { position: sticky; top: 0; height: 132px; display: grid; place-items: center; padding: 10px; }
.studio:not([data-visible="true"]) * { animation-play-state: paused; }
@media (prefers-reduced-motion: reduce) {
  .studio *, .studio *::before, .studio *::after { animation: none !important; transition: none !important; }
}

/* specimen */
.studio-spotlight {
  border-color: transparent;
  background: radial-gradient(var(--radius, 115px) circle at var(--x, 31%) var(--y, 28%), var(--stage-accent-wash), transparent) padding-box,
    linear-gradient(var(--stage-tile), var(--stage-tile)) padding-box,
    radial-gradient(var(--radius, 115px) circle at var(--x, 31%) var(--y, 28%), var(--stage-accent), var(--stage-border)) border-box;
}

macOS 风格放大程序坞

扫过程序坞,观察附近的图标放大。

代码与 AI 提示词
.studio {
  --stage: #edf1f8;
  --stage-border: #c7d1e4;
  --stage-ink: #172740;
  --stage-muted: #455976;
  --stage-tile: #ffffff;
  --stage-accent: #254fc2;
  --stage-accent-wash: #dce6ff;
  --stage-green: #14765d;
  --stage-ease: cubic-bezier(.23, 1, .32, 1);
  color: var(--stage-ink);
  background: var(--stage-tile);
  border-radius: inherit;
}
[data-theme="dark"] .studio, [data-stage="dark"].studio {
  --stage: #141a27;
  --stage-border: #35425e;
  --stage-ink: #f1f5ff;
  --stage-muted: #aebbd5;
  --stage-tile: #202a3d;
  --stage-accent: #a5baff;
  --stage-accent-wash: #2b3b64;
  --stage-green: #70dfbb;
}
.studio-stage {
  min-height: 164px;
  display: grid;
  place-items: center;
  padding: 13px;
  isolation: isolate;
  overflow: clip;
  border-radius: 7px;
  background: radial-gradient(circle, color-mix(in srgb, var(--stage-accent), transparent 76%) .65px, transparent 1px) center / 13px 13px, var(--stage);
}
.studio:has(.studio-controls) .studio-stage { border-end-start-radius: 0; border-end-end-radius: 0; }
.studio-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 14px;
  min-height: 49px;
  padding: 6px 12px;
  border-top: 1px solid var(--stage-border);
}
.studio-controls label {
  min-width: 165px;
  flex: 1;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  font-size: .74rem;
}
.studio-controls output { color: var(--stage-muted); font: .73rem ui-monospace, monospace; }
.studio-controls input { grid-column: 1/-1; margin: 0; width: 100%; accent-color: var(--stage-accent); }
.studio-action, .studio-cta {
  padding: 5px 10px;
  min-height: 34px;
  border-radius: 7px;
  border: 1px solid var(--stage-border);
  background: var(--stage-tile);
  color: var(--stage-ink);
  font: 600 .78rem/1.3 system-ui, sans-serif;
  cursor: pointer;
  transition: transform 145ms var(--stage-ease), background-color 145ms;
}
.studio :is(button, input, [tabindex]):focus-visible { outline: 2px solid var(--stage-accent); outline-offset: 2px; }
.studio-action:active, .studio-cta:active { transform: scale(.97); }
.studio-cta { background: var(--stage-accent); border-color: transparent; color: var(--stage); }
.studio-object {
  position: relative;
  width: min(250px, 100%);
  display: grid;
  gap: 5px;
  justify-items: start;
  text-align: start;
  padding: 14px 17px;
  color: var(--stage-ink);
  background: var(--stage-tile);
  border: 1px solid var(--stage-border);
  border-radius: 12px;
  box-shadow: 0 9px 20px color-mix(in srgb, #071639, transparent 88%);
}
.studio-object strong { font-size: 1.24rem; line-height: 1.15; letter-spacing: -.035em; }
.studio-object small, .studio-object > span:not(.studio-chip) { color: var(--stage-muted); font-size: .72rem; }
.studio-live { display: inline-block; inline-size: 7px; block-size: 7px; border-radius: 50%; background: var(--stage-green); vertical-align: .12em; }
.studio-scroll {
  width: min(100%, 350px);
  height: 136px;
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: var(--stage-border) var(--stage);
  border: 1px solid var(--stage-border);
  border-radius: 8px;
  background: var(--stage-tile);
}
.studio-scroll-story { height: 285px; }
.studio-pin { position: sticky; top: 0; height: 132px; display: grid; place-items: center; padding: 10px; }
.studio:not([data-visible="true"]) * { animation-play-state: paused; }
@media (prefers-reduced-motion: reduce) {
  .studio *, .studio *::before, .studio *::after { animation: none !important; transition: none !important; }
}

/* specimen */
.studio-dock { display: flex; gap: clamp(4px, 2vw, 9px); padding: 9px; background: var(--stage-tile); border: 1px solid var(--stage-border); border-radius: 18px; }
.studio-dock button { display: grid; place-items: center; width: clamp(37px, 12vw, 52px); aspect-ratio: 1; padding: 8px; border-radius: 11px; color: var(--stage-accent); background: var(--stage-accent-wash); border: 1px solid transparent; }
.studio-dock button[aria-pressed="true"] { border-color: var(--stage-accent); }
.studio-dock svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; transform-origin: center bottom; transition: transform 185ms var(--stage-ease); }

信号光束

把信号从 API 节点发送到应用端。

API应用
代码与 AI 提示词
.studio {
  --stage: #edf1f8;
  --stage-border: #c7d1e4;
  --stage-ink: #172740;
  --stage-muted: #455976;
  --stage-tile: #ffffff;
  --stage-accent: #254fc2;
  --stage-accent-wash: #dce6ff;
  --stage-green: #14765d;
  --stage-ease: cubic-bezier(.23, 1, .32, 1);
  color: var(--stage-ink);
  background: var(--stage-tile);
  border-radius: inherit;
}
[data-theme="dark"] .studio, [data-stage="dark"].studio {
  --stage: #141a27;
  --stage-border: #35425e;
  --stage-ink: #f1f5ff;
  --stage-muted: #aebbd5;
  --stage-tile: #202a3d;
  --stage-accent: #a5baff;
  --stage-accent-wash: #2b3b64;
  --stage-green: #70dfbb;
}
.studio-stage {
  min-height: 164px;
  display: grid;
  place-items: center;
  padding: 13px;
  isolation: isolate;
  overflow: clip;
  border-radius: 7px;
  background: radial-gradient(circle, color-mix(in srgb, var(--stage-accent), transparent 76%) .65px, transparent 1px) center / 13px 13px, var(--stage);
}
.studio:has(.studio-controls) .studio-stage { border-end-start-radius: 0; border-end-end-radius: 0; }
.studio-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 14px;
  min-height: 49px;
  padding: 6px 12px;
  border-top: 1px solid var(--stage-border);
}
.studio-controls label {
  min-width: 165px;
  flex: 1;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  font-size: .74rem;
}
.studio-controls output { color: var(--stage-muted); font: .73rem ui-monospace, monospace; }
.studio-controls input { grid-column: 1/-1; margin: 0; width: 100%; accent-color: var(--stage-accent); }
.studio-action, .studio-cta {
  padding: 5px 10px;
  min-height: 34px;
  border-radius: 7px;
  border: 1px solid var(--stage-border);
  background: var(--stage-tile);
  color: var(--stage-ink);
  font: 600 .78rem/1.3 system-ui, sans-serif;
  cursor: pointer;
  transition: transform 145ms var(--stage-ease), background-color 145ms;
}
.studio :is(button, input, [tabindex]):focus-visible { outline: 2px solid var(--stage-accent); outline-offset: 2px; }
.studio-action:active, .studio-cta:active { transform: scale(.97); }
.studio-cta { background: var(--stage-accent); border-color: transparent; color: var(--stage); }
.studio-object {
  position: relative;
  width: min(250px, 100%);
  display: grid;
  gap: 5px;
  justify-items: start;
  text-align: start;
  padding: 14px 17px;
  color: var(--stage-ink);
  background: var(--stage-tile);
  border: 1px solid var(--stage-border);
  border-radius: 12px;
  box-shadow: 0 9px 20px color-mix(in srgb, #071639, transparent 88%);
}
.studio-object strong { font-size: 1.24rem; line-height: 1.15; letter-spacing: -.035em; }
.studio-object small, .studio-object > span:not(.studio-chip) { color: var(--stage-muted); font-size: .72rem; }
.studio-live { display: inline-block; inline-size: 7px; block-size: 7px; border-radius: 50%; background: var(--stage-green); vertical-align: .12em; }
.studio-scroll {
  width: min(100%, 350px);
  height: 136px;
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: var(--stage-border) var(--stage);
  border: 1px solid var(--stage-border);
  border-radius: 8px;
  background: var(--stage-tile);
}
.studio-scroll-story { height: 285px; }
.studio-pin { position: sticky; top: 0; height: 132px; display: grid; place-items: center; padding: 10px; }
.studio:not([data-visible="true"]) * { animation-play-state: paused; }
@media (prefers-reduced-motion: reduce) {
  .studio *, .studio *::before, .studio *::after { animation: none !important; transition: none !important; }
}

/* specimen */
.studio-signal { position: relative; width: min(100%, 264px); aspect-ratio: 264 / 94; }
.studio-signal svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.studio-signal path { fill: none; stroke: var(--stage-border); stroke-width: 3; }
.studio-signal path + path { stroke: var(--stage-accent); stroke-linecap: round; stroke-dasharray: 17 83; stroke-dashoffset: 6; }
.studio-signal span { position: absolute; padding: 5px 8px; background: var(--stage-tile); border: 1px solid var(--stage-border); border-radius: 7px; font: 600 .72rem ui-monospace, monospace; }
.studio-signal span:first-of-type { left: 2%; top: 57%; }
.studio-signal span:last-of-type { right: 2%; top: 15%; }

文字逐词聚焦

重播标题,观察词语如何依次变清晰。

让下一步清晰可见。
代码与 AI 提示词
.studio {
  --stage: #edf1f8;
  --stage-border: #c7d1e4;
  --stage-ink: #172740;
  --stage-muted: #455976;
  --stage-tile: #ffffff;
  --stage-accent: #254fc2;
  --stage-accent-wash: #dce6ff;
  --stage-green: #14765d;
  --stage-ease: cubic-bezier(.23, 1, .32, 1);
  color: var(--stage-ink);
  background: var(--stage-tile);
  border-radius: inherit;
}
[data-theme="dark"] .studio, [data-stage="dark"].studio {
  --stage: #141a27;
  --stage-border: #35425e;
  --stage-ink: #f1f5ff;
  --stage-muted: #aebbd5;
  --stage-tile: #202a3d;
  --stage-accent: #a5baff;
  --stage-accent-wash: #2b3b64;
  --stage-green: #70dfbb;
}
.studio-stage {
  min-height: 164px;
  display: grid;
  place-items: center;
  padding: 13px;
  isolation: isolate;
  overflow: clip;
  border-radius: 7px;
  background: radial-gradient(circle, color-mix(in srgb, var(--stage-accent), transparent 76%) .65px, transparent 1px) center / 13px 13px, var(--stage);
}
.studio:has(.studio-controls) .studio-stage { border-end-start-radius: 0; border-end-end-radius: 0; }
.studio-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 14px;
  min-height: 49px;
  padding: 6px 12px;
  border-top: 1px solid var(--stage-border);
}
.studio-controls label {
  min-width: 165px;
  flex: 1;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  font-size: .74rem;
}
.studio-controls output { color: var(--stage-muted); font: .73rem ui-monospace, monospace; }
.studio-controls input { grid-column: 1/-1; margin: 0; width: 100%; accent-color: var(--stage-accent); }
.studio-action, .studio-cta {
  padding: 5px 10px;
  min-height: 34px;
  border-radius: 7px;
  border: 1px solid var(--stage-border);
  background: var(--stage-tile);
  color: var(--stage-ink);
  font: 600 .78rem/1.3 system-ui, sans-serif;
  cursor: pointer;
  transition: transform 145ms var(--stage-ease), background-color 145ms;
}
.studio :is(button, input, [tabindex]):focus-visible { outline: 2px solid var(--stage-accent); outline-offset: 2px; }
.studio-action:active, .studio-cta:active { transform: scale(.97); }
.studio-cta { background: var(--stage-accent); border-color: transparent; color: var(--stage); }
.studio-object {
  position: relative;
  width: min(250px, 100%);
  display: grid;
  gap: 5px;
  justify-items: start;
  text-align: start;
  padding: 14px 17px;
  color: var(--stage-ink);
  background: var(--stage-tile);
  border: 1px solid var(--stage-border);
  border-radius: 12px;
  box-shadow: 0 9px 20px color-mix(in srgb, #071639, transparent 88%);
}
.studio-object strong { font-size: 1.24rem; line-height: 1.15; letter-spacing: -.035em; }
.studio-object small, .studio-object > span:not(.studio-chip) { color: var(--stage-muted); font-size: .72rem; }
.studio-live { display: inline-block; inline-size: 7px; block-size: 7px; border-radius: 50%; background: var(--stage-green); vertical-align: .12em; }
.studio-scroll {
  width: min(100%, 350px);
  height: 136px;
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: var(--stage-border) var(--stage);
  border: 1px solid var(--stage-border);
  border-radius: 8px;
  background: var(--stage-tile);
}
.studio-scroll-story { height: 285px; }
.studio-pin { position: sticky; top: 0; height: 132px; display: grid; place-items: center; padding: 10px; }
.studio:not([data-visible="true"]) * { animation-play-state: paused; }
@media (prefers-reduced-motion: reduce) {
  .studio *, .studio *::before, .studio *::after { animation: none !important; transition: none !important; }
}

/* specimen */
.studio-headline { font-size: clamp(1.35rem, 3vw, 2.4rem); line-height: 1.14; font-weight: 600; letter-spacing: -.045em; text-align: center; }
.studio-headline [data-word] { display: inline-block; margin-inline: .10em; }

变形对话框

打开预览卡片,按 Esc 关闭对话框。

发布说明

工作区更新

查看最近的变更,让团队同步进展。

代码与 AI 提示词
.studio {
  --stage: #edf1f8;
  --stage-border: #c7d1e4;
  --stage-ink: #172740;
  --stage-muted: #455976;
  --stage-tile: #ffffff;
  --stage-accent: #254fc2;
  --stage-accent-wash: #dce6ff;
  --stage-green: #14765d;
  --stage-ease: cubic-bezier(.23, 1, .32, 1);
  color: var(--stage-ink);
  background: var(--stage-tile);
  border-radius: inherit;
}
[data-theme="dark"] .studio, [data-stage="dark"].studio {
  --stage: #141a27;
  --stage-border: #35425e;
  --stage-ink: #f1f5ff;
  --stage-muted: #aebbd5;
  --stage-tile: #202a3d;
  --stage-accent: #a5baff;
  --stage-accent-wash: #2b3b64;
  --stage-green: #70dfbb;
}
.studio-stage {
  min-height: 164px;
  display: grid;
  place-items: center;
  padding: 13px;
  isolation: isolate;
  overflow: clip;
  border-radius: 7px;
  background: radial-gradient(circle, color-mix(in srgb, var(--stage-accent), transparent 76%) .65px, transparent 1px) center / 13px 13px, var(--stage);
}
.studio:has(.studio-controls) .studio-stage { border-end-start-radius: 0; border-end-end-radius: 0; }
.studio-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 14px;
  min-height: 49px;
  padding: 6px 12px;
  border-top: 1px solid var(--stage-border);
}
.studio-controls label {
  min-width: 165px;
  flex: 1;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  font-size: .74rem;
}
.studio-controls output { color: var(--stage-muted); font: .73rem ui-monospace, monospace; }
.studio-controls input { grid-column: 1/-1; margin: 0; width: 100%; accent-color: var(--stage-accent); }
.studio-action, .studio-cta {
  padding: 5px 10px;
  min-height: 34px;
  border-radius: 7px;
  border: 1px solid var(--stage-border);
  background: var(--stage-tile);
  color: var(--stage-ink);
  font: 600 .78rem/1.3 system-ui, sans-serif;
  cursor: pointer;
  transition: transform 145ms var(--stage-ease), background-color 145ms;
}
.studio :is(button, input, [tabindex]):focus-visible { outline: 2px solid var(--stage-accent); outline-offset: 2px; }
.studio-action:active, .studio-cta:active { transform: scale(.97); }
.studio-cta { background: var(--stage-accent); border-color: transparent; color: var(--stage); }
.studio-object {
  position: relative;
  width: min(250px, 100%);
  display: grid;
  gap: 5px;
  justify-items: start;
  text-align: start;
  padding: 14px 17px;
  color: var(--stage-ink);
  background: var(--stage-tile);
  border: 1px solid var(--stage-border);
  border-radius: 12px;
  box-shadow: 0 9px 20px color-mix(in srgb, #071639, transparent 88%);
}
.studio-object strong { font-size: 1.24rem; line-height: 1.15; letter-spacing: -.035em; }
.studio-object small, .studio-object > span:not(.studio-chip) { color: var(--stage-muted); font-size: .72rem; }
.studio-live { display: inline-block; inline-size: 7px; block-size: 7px; border-radius: 50%; background: var(--stage-green); vertical-align: .12em; }
.studio-scroll {
  width: min(100%, 350px);
  height: 136px;
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: var(--stage-border) var(--stage);
  border: 1px solid var(--stage-border);
  border-radius: 8px;
  background: var(--stage-tile);
}
.studio-scroll-story { height: 285px; }
.studio-pin { position: sticky; top: 0; height: 132px; display: grid; place-items: center; padding: 10px; }
.studio:not([data-visible="true"]) * { animation-play-state: paused; }
@media (prefers-reduced-motion: reduce) {
  .studio *, .studio *::before, .studio *::after { animation: none !important; transition: none !important; }
}

/* specimen */
.studio-dialog-trigger { cursor: pointer; }
.studio-dialog { max-width: min(400px, calc(100% - 32px)); padding: 22px; color: var(--stage-ink); background: var(--stage-tile); border: 1px solid var(--stage-border); border-radius: 14px; }
.studio-dialog p { margin: 10px 0 18px; color: var(--stage-muted); }
.studio-dialog::backdrop { background: #111b30a8; }

弹簧折叠面板

展开面板,再试着在过渡中收起它。

代码与 AI 提示词
.studio {
  --stage: #edf1f8;
  --stage-border: #c7d1e4;
  --stage-ink: #172740;
  --stage-muted: #455976;
  --stage-tile: #ffffff;
  --stage-accent: #254fc2;
  --stage-accent-wash: #dce6ff;
  --stage-green: #14765d;
  --stage-ease: cubic-bezier(.23, 1, .32, 1);
  color: var(--stage-ink);
  background: var(--stage-tile);
  border-radius: inherit;
}
[data-theme="dark"] .studio, [data-stage="dark"].studio {
  --stage: #141a27;
  --stage-border: #35425e;
  --stage-ink: #f1f5ff;
  --stage-muted: #aebbd5;
  --stage-tile: #202a3d;
  --stage-accent: #a5baff;
  --stage-accent-wash: #2b3b64;
  --stage-green: #70dfbb;
}
.studio-stage {
  min-height: 164px;
  display: grid;
  place-items: center;
  padding: 13px;
  isolation: isolate;
  overflow: clip;
  border-radius: 7px;
  background: radial-gradient(circle, color-mix(in srgb, var(--stage-accent), transparent 76%) .65px, transparent 1px) center / 13px 13px, var(--stage);
}
.studio:has(.studio-controls) .studio-stage { border-end-start-radius: 0; border-end-end-radius: 0; }
.studio-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 14px;
  min-height: 49px;
  padding: 6px 12px;
  border-top: 1px solid var(--stage-border);
}
.studio-controls label {
  min-width: 165px;
  flex: 1;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  font-size: .74rem;
}
.studio-controls output { color: var(--stage-muted); font: .73rem ui-monospace, monospace; }
.studio-controls input { grid-column: 1/-1; margin: 0; width: 100%; accent-color: var(--stage-accent); }
.studio-action, .studio-cta {
  padding: 5px 10px;
  min-height: 34px;
  border-radius: 7px;
  border: 1px solid var(--stage-border);
  background: var(--stage-tile);
  color: var(--stage-ink);
  font: 600 .78rem/1.3 system-ui, sans-serif;
  cursor: pointer;
  transition: transform 145ms var(--stage-ease), background-color 145ms;
}
.studio :is(button, input, [tabindex]):focus-visible { outline: 2px solid var(--stage-accent); outline-offset: 2px; }
.studio-action:active, .studio-cta:active { transform: scale(.97); }
.studio-cta { background: var(--stage-accent); border-color: transparent; color: var(--stage); }
.studio-object {
  position: relative;
  width: min(250px, 100%);
  display: grid;
  gap: 5px;
  justify-items: start;
  text-align: start;
  padding: 14px 17px;
  color: var(--stage-ink);
  background: var(--stage-tile);
  border: 1px solid var(--stage-border);
  border-radius: 12px;
  box-shadow: 0 9px 20px color-mix(in srgb, #071639, transparent 88%);
}
.studio-object strong { font-size: 1.24rem; line-height: 1.15; letter-spacing: -.035em; }
.studio-object small, .studio-object > span:not(.studio-chip) { color: var(--stage-muted); font-size: .72rem; }
.studio-live { display: inline-block; inline-size: 7px; block-size: 7px; border-radius: 50%; background: var(--stage-green); vertical-align: .12em; }
.studio-scroll {
  width: min(100%, 350px);
  height: 136px;
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: var(--stage-border) var(--stage);
  border: 1px solid var(--stage-border);
  border-radius: 8px;
  background: var(--stage-tile);
}
.studio-scroll-story { height: 285px; }
.studio-pin { position: sticky; top: 0; height: 132px; display: grid; place-items: center; padding: 10px; }
.studio:not([data-visible="true"]) * { animation-play-state: paused; }
@media (prefers-reduced-motion: reduce) {
  .studio *, .studio *::before, .studio *::after { animation: none !important; transition: none !important; }
}

/* specimen */
.studio-accordion { padding: 0; gap: 0; }
.studio-accordion button { width: 100%; display: flex; justify-content: space-between; gap: 8px; padding: 12px; background: transparent; color: inherit; border: 0; text-align: start; cursor: pointer; }
.studio-accordion button span { transition: transform 190ms var(--stage-ease); }
.studio-accordion button[aria-expanded="true"] span { transform: rotate(180deg); }
.studio-accordion-body { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 240ms cubic-bezier(.25, 1.2, .45, 1); }
.studio-accordion-body[aria-hidden="false"] { grid-template-rows: 1fr; }
.studio-accordion-body > div { overflow: hidden; }
.studio-accordion-body p { margin: 0; padding: 0 12px 12px; color: var(--stage-muted); font-size: .78rem; }
.studio-accordion[data-instant] * { transition: none; }

变形复制按钮

复制一个设计令牌,观察图标如何变成勾号。

--radius: 12px;
代码与 AI 提示词
.studio {
  --stage: #edf1f8;
  --stage-border: #c7d1e4;
  --stage-ink: #172740;
  --stage-muted: #455976;
  --stage-tile: #ffffff;
  --stage-accent: #254fc2;
  --stage-accent-wash: #dce6ff;
  --stage-green: #14765d;
  --stage-ease: cubic-bezier(.23, 1, .32, 1);
  color: var(--stage-ink);
  background: var(--stage-tile);
  border-radius: inherit;
}
[data-theme="dark"] .studio, [data-stage="dark"].studio {
  --stage: #141a27;
  --stage-border: #35425e;
  --stage-ink: #f1f5ff;
  --stage-muted: #aebbd5;
  --stage-tile: #202a3d;
  --stage-accent: #a5baff;
  --stage-accent-wash: #2b3b64;
  --stage-green: #70dfbb;
}
.studio-stage {
  min-height: 164px;
  display: grid;
  place-items: center;
  padding: 13px;
  isolation: isolate;
  overflow: clip;
  border-radius: 7px;
  background: radial-gradient(circle, color-mix(in srgb, var(--stage-accent), transparent 76%) .65px, transparent 1px) center / 13px 13px, var(--stage);
}
.studio:has(.studio-controls) .studio-stage { border-end-start-radius: 0; border-end-end-radius: 0; }
.studio-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 14px;
  min-height: 49px;
  padding: 6px 12px;
  border-top: 1px solid var(--stage-border);
}
.studio-controls label {
  min-width: 165px;
  flex: 1;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  font-size: .74rem;
}
.studio-controls output { color: var(--stage-muted); font: .73rem ui-monospace, monospace; }
.studio-controls input { grid-column: 1/-1; margin: 0; width: 100%; accent-color: var(--stage-accent); }
.studio-action, .studio-cta {
  padding: 5px 10px;
  min-height: 34px;
  border-radius: 7px;
  border: 1px solid var(--stage-border);
  background: var(--stage-tile);
  color: var(--stage-ink);
  font: 600 .78rem/1.3 system-ui, sans-serif;
  cursor: pointer;
  transition: transform 145ms var(--stage-ease), background-color 145ms;
}
.studio :is(button, input, [tabindex]):focus-visible { outline: 2px solid var(--stage-accent); outline-offset: 2px; }
.studio-action:active, .studio-cta:active { transform: scale(.97); }
.studio-cta { background: var(--stage-accent); border-color: transparent; color: var(--stage); }
.studio-object {
  position: relative;
  width: min(250px, 100%);
  display: grid;
  gap: 5px;
  justify-items: start;
  text-align: start;
  padding: 14px 17px;
  color: var(--stage-ink);
  background: var(--stage-tile);
  border: 1px solid var(--stage-border);
  border-radius: 12px;
  box-shadow: 0 9px 20px color-mix(in srgb, #071639, transparent 88%);
}
.studio-object strong { font-size: 1.24rem; line-height: 1.15; letter-spacing: -.035em; }
.studio-object small, .studio-object > span:not(.studio-chip) { color: var(--stage-muted); font-size: .72rem; }
.studio-live { display: inline-block; inline-size: 7px; block-size: 7px; border-radius: 50%; background: var(--stage-green); vertical-align: .12em; }
.studio-scroll {
  width: min(100%, 350px);
  height: 136px;
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: var(--stage-border) var(--stage);
  border: 1px solid var(--stage-border);
  border-radius: 8px;
  background: var(--stage-tile);
}
.studio-scroll-story { height: 285px; }
.studio-pin { position: sticky; top: 0; height: 132px; display: grid; place-items: center; padding: 10px; }
.studio:not([data-visible="true"]) * { animation-play-state: paused; }
@media (prefers-reduced-motion: reduce) {
  .studio *, .studio *::before, .studio *::after { animation: none !important; transition: none !important; }
}

/* specimen */
.studio-copy { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 7px; width: min(290px,100%); }
.studio-copy > code { padding: 6px 9px; border: 1px solid var(--stage-border); border-radius: 7px; background: var(--stage-tile); font-size: .79rem; }
.studio-copy button { position: relative; display: grid; grid-template-columns: auto 1em; gap: .35em; align-items: center; }
.studio-copy i { grid-area: 1 / 2; font-style: normal; transition: opacity 160ms, transform 160ms var(--stage-ease); }
.studio-copy i:nth-of-type(2), .studio-copy button[data-copied] i:first-of-type { opacity: 0; transform: scale(.9); }
.studio-copy button[data-copied] i:nth-of-type(2) { opacity: 1; transform: none; }
.studio-copy .studio-burst { opacity: 0; position: absolute; z-index: 1; top: -3px; right: 0; color: var(--stage-green); pointer-events: none; }
.studio-copy button[data-instant] i { transition: none; }
.studio-copy output { width: 100%; min-height: 1.3em; text-align: center; color: var(--stage-muted); font-size: .72rem; }

触感按压反馈

按住每个按钮,在右侧调整时长和缩放。

代码与 AI 提示词
.press-stage { display: grid; gap: 9px; padding: 15px; }
.press-stage .lab-control-row { min-height: 64px; }
.press-default { transition: transform 420ms ease 110ms; }
.press-default:active { transform: scale(.9); }
.press-tuned { transition: transform var(--press-duration, 160ms) cubic-bezier(.23,1,.32,1); }
.press-tuned:active { transform: scale(var(--press-scale,.97)); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms;
    transition-duration: .001ms;
  }
}

感知原点的弹出层

从任意角落打开。开启中心原点即可对比。

代码与 AI 提示词
.pop-stage { width: min(100%,360px); height: 132px; position: relative; }
.pop-trigger { position: absolute; z-index: 2; }
.pop-trigger[data-corner="tl"] { inset: 0 auto auto 0; }
.pop-trigger[data-corner="tr"] { inset: 0 0 auto auto; }
.pop-trigger[data-corner="bl"] { inset: auto auto 0 0; }
.pop-trigger[data-corner="br"] { inset: auto 0 0 auto; }
.pop-panel {
  position: absolute; inset: 35px auto auto 0; width: min(190px, 70%); padding: 7px 9px;
  background: var(--canvas); border-radius: 8px; box-shadow: var(--shadow); z-index: 1;
  transform-origin: var(--anchor-origin, center); opacity: 0; transform: scale(.95);
  pointer-events: none; visibility: hidden;
  transition: transform 160ms var(--ease-out), opacity 140ms, visibility 160ms;
  font-size: .77rem;
}
.pop-panel[data-side="right"] { right: 0; left: auto; }
.pop-panel[data-edge="bottom"] { top: auto; bottom: 35px; }
.pop-panel[data-open="true"] { opacity: 1; transform: scale(1); visibility: visible; }
.pop-stage[data-naive="true"] .pop-panel { transform-origin: center; }
.pop-mode { position: absolute; top: 52px; left: 50%; transform: translateX(-50%); display: flex; gap: 5px; align-items: center; color: var(--body); white-space: nowrap; font-size: .74rem; }
.pop-mode input { accent-color: var(--ink); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms;
    transition-duration: .001ms;
  }
}

模糊遮罩状态切换

保存后即可在一个稳定的按钮中查看空闲、保存中和已保存状态。

可以保存
代码与 AI 提示词
.morph-stage { align-content: center; gap: 10px; }
.morph-button { display: grid; min-width: 130px; }
.morph-button span { grid-area: 1/1; opacity: 0; filter: blur(2px); transform: translateY(3px); transition: opacity 140ms, filter 160ms, transform 160ms var(--ease-out); }
.morph-button[data-state="idle"] [data-label="idle"],
.morph-button[data-state="saving"] [data-label="saving"],
.morph-button[data-state="saved"] [data-label="saved"] { opacity: 1; filter: blur(0); transform: translateY(0); }
.morph-button[data-state="saved"] { background: #0759b4; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms;
    transition-duration: .001ms;
  }
}

Clip-path 标签页与长按删除

切换标签页,然后长按删除两秒。松开即可取消。

已选中概览长按两秒。
代码与 AI 提示词
.segmented-stage { align-content: center; gap: 11px; }
.clip-tabs { position: relative; display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); border-radius: 8px; background: var(--canvas); border: 1px solid var(--line); }
.clip-tabs button,.clip-tabs-overlay span { min-width: 0; min-height: 38px; display: grid; place-items: center; padding: 5px 7px; border: 0; background: none; color: inherit; font-size: .78rem; position: relative; }
.clip-tabs button:focus-visible { z-index: 2; }
.clip-tabs-overlay {
  pointer-events: none; position: absolute; inset: 0; display: grid; grid-template-columns: repeat(3,minmax(0,1fr));
  grid-column: 1/-1; background: var(--ink); color: var(--canvas);
  clip-path: inset(0 var(--clip-right,66.666%) 0 var(--clip-left,0%) round 7px);
  transition: clip-path 200ms var(--ease-in-out);
}
.hold-delete { isolation: isolate; overflow: hidden; position: relative; }
.hold-delete::before { position: absolute; inset: 0; content: ''; z-index: -1; background: var(--error-soft); transform: scaleX(var(--hold-progress, 0)); transform-origin: left; transition: transform 200ms var(--ease-out); }
.hold-delete[data-hold="true"]::before { transform: scaleX(1); transition: transform 2s linear; }
.hold-delete[data-deleted="true"] { color: var(--error); }
.hold-delete span { min-width: 11ch; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms;
    transition-duration: .001ms;
  }
}

可中断的堆叠提示

生成多个提示,然后悬停或聚焦堆叠区域即可展开。

代码与 AI 提示词
.toast-stage { grid-template-rows: 1fr auto; gap: 7px; min-height: 158px; }
.toast-stack { position: relative; width: min(260px,100%); height: 124px; }
.toast-item {
  display: flex; justify-content: space-between; align-items: center; gap: 6px;
  position: absolute; left: 0; right: 0; bottom: 0; padding: 2px 7px 2px 10px;
  background: var(--canvas); border-radius: 8px; box-shadow: var(--shadow);
  transform: translateY(calc(var(--layer) * -7px)) scale(calc(1 - var(--layer) * .045));
  transition: transform 300ms var(--ease-out), opacity 220ms var(--ease-out);
  font-size: .82rem;
}
.toast-item[data-leaving] { transform: translateY(14px) scale(.95); opacity: 0; pointer-events: none; }
@starting-style { .toast-item { transform: translateY(12px) scale(.95); opacity: 0; } }
.toast-stack:focus-within .toast-item { transform: translateY(calc(var(--layer) * -39px)); }
@media (hover: hover) and (pointer: fine) {
  .toast-stack:hover .toast-item { transform: translateY(calc(var(--layer) * -39px)); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms;
    transition-duration: .001ms;
  }
}

弹簧曲线演练场

拖动小球或点击“移动”,查看小球与卡片遵循同一弹簧效果。

代码与 AI 提示词
.spring-stage { padding: 10px; display: grid; gap: 7px; }
.spring-rail { position: relative; height: 70px; overflow: hidden; border: 1px solid var(--line); background: var(--canvas); border-radius: 8px; }
.spring-rail::before { content: ''; position: absolute; left: 12px; right: 12px; top: 20px; border-top: 1px dashed var(--line-strong); }
.spring-ball { position: absolute; top: 6px; left: 5px; width: 28px; height: 28px; background: var(--ink); color: var(--canvas); border: 0; border-radius: 50%; touch-action: none; cursor: grab; transform: translateX(var(--spring-x,0px)); }
.spring-ball:active { cursor: grabbing; transform: translateX(var(--spring-x,0px)) scale(.97); }
.spring-card { position: absolute; top: 38px; left: 5px; display: grid; place-items: center; width: 66px; height: 24px; border: 1px solid var(--line); border-radius: 5px; background: var(--canvas-inset); color: var(--body); font: 500 .64rem var(--mono); transform: translateX(var(--spring-x,0px)); }
@media (prefers-reduced-motion: reduce) {
  .spring-ball:active { transform: translateX(var(--spring-x,0px)); }
}
.spring-curve { display: block; width: 100%; height: 43px; background: var(--canvas); border-radius: 6px; }
.spring-curve path { fill: none; stroke: var(--link); stroke-width: 2; vector-effect: non-scaling-stroke; }
.spring-status { display: flex; align-items: center; justify-content: space-between; gap: 4px; }
.spring-status output { font: 500 .69rem var(--mono); color: var(--body); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms;
    transition-duration: .001ms;
  }
}