本文へ移動
cccskills
無料GitHub で公開

transitions-ui-generation

Make any UI appear as if an AI agent is generating it. A dotted wireframe is drawn from the element's own structure (outline, boxes, text lines, icon paths, with guides, corner handles and size labels), then the real UI is revealed behind a scan line with a fade on a smooth ease-out. Two modes, skeleton and skeleton + generation texts (an agent log, the motion CSS being written, and a step line). One dependency-free runtime that works with any framework (vanilla, React, Next.js, Vue, Svelte). Use when the user asks for a "generation animation", "AI generating the UI", "agent building the component", "build-in animation", "wireframe to UI reveal", "skeleton generation", "dotted wireframe", "matrix dots", "make it look generated", "futuristic reveal", "generative UI loading", or for an AI product that should show its output being built. Also the commands transitions generate, transitions generate texts and transitions generate preview.

インストール方法を見る

含まれるファイル(7)

  • SKILL.md12.0 KB
  • 01-skeleton.md3.1 KB
  • 02-skeleton-texts.md2.4 KB
  • demo.html75.2 KB
  • LICENSE.txt1.2 KB
  • ui-generation.css4.1 KB
  • ui-generation.js34.1 KB

SKILL.md(原文)

インストールする前に、エージェントに与えられる指示の中身を確認できます。

Transitions UI generation

Plays an "agent is generating this" animation over any element on the page, then hands over to the real UI. Nothing is faked: the drawing is measured from the element itself, so the dotted outline, text lines and icons land exactly where the real ones appear.

Works in every agent that reads skills (Claude Code, Cursor, Codex, and others): install with npx skills add Jakubantalik/transitions.dev, or copy this folder into the project.

What it draws

In order, over one build (default 2400ms of drawing, about 2.6s in all):

  1. Dot field. A grid of small dots ripples out from the centre, with matrix rain falling down its columns and a probe line sweeping across.
  2. Construction. Guides run along the element's edges past its corners, corner handles pop in, and a size label counts up to the real size with a build timer.
  3. Outline. The outline is traced from the top centre in both directions in small flowing dots, while loose dots fly in and land on it.
  4. Parts. Every box, text line and icon path is traced in document order. Key elements (buttons, inputs, the largest boxes) get their own guides, handles and size label, and a targeting reticle jumps from part to part with a coordinate readout.
  5. Reveal. The real UI comes in top to bottom behind a scan line, fading and sharpening on --ease-smooth-out, while the drawing is wiped away and the dots clear.

Options

ModeWhat you getUse forReference
skeletonThe dotted drawing and the reveal.Most places: a card or panel an agent produced, an empty state filling in, a hero moment.01-skeleton.md
skeleton-textsThe same, plus generation texts: an agent log (one line per part with a progress bar), the motion CSS being written (the element's own values on the transitions.dev token scale), and a step line ("Planning layout" … "Ready").Showcases and launch moments where the "agent at work" story matters: landing pages, demos, onboarding, product videos. Needs space beside or under the element; it places the texts only where the page is empty.02-skeleton-texts.md

Decision rules

  • An AI feature returns UI (a generated component, a chart, a summary card, a draft) → skeleton, played when the result arrives.
  • A launch page, demo or video that should tell the "built by an agent" story → skeleton-texts, played when it scrolls into view.
  • The user asks for "the texts", "the log", "the code streaming", "the futuristic version" → skeleton-texts.
  • Several elements at once (a grid of results) → skeleton on each with a delay of about 260ms per item. The texts only fit around one element at a time.
  • Small inline UI (a badge, a single button, anything under about 120px) or UI that appears often (every route change, every list row) → don't use this. Use the transitions-dev skeleton reveal (14-skeleton-reveal.md) or texts reveal instead: a generation animation is a moment, not a loading state.
  • Unsure which mode → skeleton. Ask before adding the texts.

Commands

transitions generate

Trigger phrases: transitions generate, "add the generation animation", "make this look AI generated", "animate this like an agent builds it".

Behaviour:

  1. Find the element: the one the user named, the component in the open file, or the element nearest the cursor. If it is ambiguous, ask which.
  2. Pick the mode with the decision rules (default skeleton), and the trigger: on mount, when data arrives, on scroll into view, or on demand.
  3. Propose it in one line, for example: "I'd play skeleton on <ResultCard> when the response arrives. Confirm?"
  4. On confirmation, follow ## Install and ## Wiring below. Keep the diff small.

transitions generate texts

Same as transitions generate with mode: "skeleton-texts". Mention that the texts need empty space beside or under the element and are skipped where there is none.

transitions generate preview

Open demo.html (serve the folder over http, for example npx serve in this directory) to see both modes on three components published on the transitions.dev Community (Heart Rate Monitor, Chart card, Music Player Likes), with a one-card layout that shows the side panels. Each component is mounted in its own shadow root, so its styles and scripts stay as published.

Install

  1. Copy ui-generation.js and ui-generation.css into the project (for example src/lib/ or public/vendor/). Both files are self-contained, with no dependencies.
  2. Import the CSS once, globally (a <link>, or import "./ui-generation.css" in the app entry).
  3. Import generate (and auto for the attribute API) where the element lives.

Do not rewrite the runtime or its timings. They are tuned together: the drawing phases, the dot spacing, the flow speed and the reveal curve.

Wiring

Call generate after the element has rendered and has its final size, with fonts loaded. It hides the element itself until the reveal, then restores its inline opacity, clip-path and filter.

Vanilla

import { generate } from "./ui-generation.js";
await document.fonts.ready;
const run = generate(document.querySelector("#result"), { mode: "skeleton" });
await run.finished; // the real UI is fully in

Attribute API (plays each element once it scrolls into view)

<section data-t-generate="skeleton-texts" data-t-generate-delay="200">…</section>
<script type="module">
  import { auto } from "./ui-generation.js";
  auto();
</script>

React / Next.js (client component)

"use client";
import { useLayoutEffect, useRef } from "react";
import { generate } from "@/lib/ui-generation.js";

export function GeneratedCard({ data }) {
  const ref = useRef(null);
  useLayoutEffect(() => {
    if (!ref.current) return;
    const run = generate(ref.current, { mode: "skeleton" });
    return () => run.cancel();
  }, [data]); // replays when new data arrives
  return <div ref={ref} className="card">{/* … */}</div>;
}

Vue

import { onMounted, onBeforeUnmount, ref } from "vue";
import { generate } from "@/lib/ui-generation.js";
const el = ref(null); let run;
onMounted(() => { run = generate(el.value, { mode: "skeleton" }); });
onBeforeUnmount(() => run && run.cancel());

Svelte (action)

import { generate } from "$lib/ui-generation.js";
export function generating(node, mode = "skeleton") { const run = generate(node, { mode }); return { destroy: () => run.cancel() }; }
// <div use:generating={"skeleton-texts"}>…</div>

API

generate(element, options) returns { finished, cancel, element }. finished resolves when the real UI is fully in. cancel() stops at once and shows the element as it is. Calling generate again on the same element cancels the previous run.

OptionDefaultNotes
mode"skeleton""skeleton" or "skeleton-texts".
duration2400ms of drawing. The whole run is about duration × 1.09. Keep it between 1600 and 3600.
delay0ms before it starts (stagger several elements with it).
steps["Planning layout", "Drawing structure", "Writing styles", "Adding motion"]The step line (skeleton-texts).
done"Ready"The last step, shown as the UI comes in. Use the component's name, for example "Invite modal ready".
codederivedLines for the motion CSS panel. By default the element's own radius, type and colours with transitions.dev motion tokens.
titlederivedName in the motion CSS header (else aria-label or the first heading).
maxParts60Most parts traced; the largest are kept.
keys5Key elements that get guides, handles and a size label.
onDonenullCalled with the element when the run ends.

Mark any child with data-t-generate-skip to leave it out of the drawing.

Tunable variables

In ui-generation.css. Light values shown; dark values switch with prefers-color-scheme or [data-theme="dark"].

VariableDefaultNotes
--gen-line#9a9a9aThe dotted lines: outline, parts, guides.
--gen-strong#6c6c6cMoving dot heads, handles, reticle, lit dots, labels.
--gen-inkrgba(13, 13, 13, 0.32)The resting dot field.
--gen-surface#ffffffFill of the corner handles (match the page background).
--gen-text / --gen-muted#0d0d0d / #8b8b8bPanel headings and copy (skeleton-texts).
--gen-dot2.1pxDot size on the traced lines.
--gen-fontRoboto Mono, monospaceLabels and panels.

Keep the drawing monochrome. Grey dots read as "the agent's working layer"; the real UI brings the colour when it arrives.

Accessibility

  • prefers-reduced-motion: reduce skips the drawing entirely: the element fades in over 200ms and finished resolves as usual. Never remove this.
  • The overlay is aria-hidden and takes no pointer input. The element stays in the accessibility tree the whole time.
  • Don't gate interaction on it: the element is usable as soon as finished resolves (about 2.6s). For anything a user waits on repeatedly, use a skeleton loader instead.

Common mistakes to avoid

  • Running before layout settles. Measuring before fonts or images load draws text lines and boxes in the wrong place. Await document.fonts.ready (and images, if they size the layout) first.
  • Running on display: none. A hidden element has no size; show it first. In tabs and accordions, generate after the panel opens.
  • Animating the element yourself at the same time. Don't add your own entrance transition to the element; the runtime owns its opacity, clip-path and filter during the run.
  • A parent with overflow: hidden and scrolling during the run. The overlay sits on the page, not inside the scroller; if the element scrolls during the 2.6s the drawing drifts. Play it once the element is in view (the attribute API does).
  • Using it as a loading state. It plays once, over the real UI. While data is still loading, show a skeleton; play the generation when the data arrives.
  • Forcing the texts into a tight layout. skeleton-texts only draws its panels where the page is empty. In a dense grid it falls back to the step line, or nothing. That is correct; use skeleton there.
  • Importing on the server. It needs window and the DOM. In Next.js or Nuxt, import it in a client component or inside an effect.

Reference files

レビュー

まだレビューはありません。使ってみた感想をお寄せください。

同じリポジトリのスキル

概要と使いどころ

In-chat fallback for the Timeline Inspector Refine agent. Use when the user runs `/refine live`, asks to "refine live", "go live", or answer refine jobs — but ONLY when no persistent agent is wired (no `npx transitions-refine live`). Prefer `npx transitions-refine live` for run-and-forget (relay spawns agent per click, no idle credit burn). This skill long-polls the relay, posts suggestions, handles scan/apply jobs.

日本語の概要は準備中です。原文の説明を表示しています。

Jakubantalik/transitions.dev5,0812026年10月13日 更新

Scan a codebase for missing, janky, or inconsistent UI motion and fix it with transitions.dev recipes. ALWAYS use this skill when the user's message is or contains a transitions-agent command (npx transitions-agent, npx transitions-agent fix, any variant) - the command is a request for the full guided flow, not just command execution. Also use when the user asks about UI transitions, animations, motion quality, a motion score, janky or missing transitions, "polish the motion", "fix the animations", or whether the motion is good after UI changes.

日本語の概要は準備中です。原文の説明を表示しています。

Jakubantalik/transitions.dev5,0812026年10月13日 更新

Production-ready CSS transitions for web apps. Use when implementing notification badges, dropdowns, modals, panel reveals, page transitions, card resizes, number pop-ins, text swaps, icon swaps, success checks, avatar group hovers, error state shakes, search/input clear, skeleton loaders, shimmer text, sliding tabs, tooltips, staggered text reveals, card hover tilt, plus-to-menu morph, accordions, toasts, like buttons, learn-more hovers, checkbox checks, spinning counters, toggles, AI thinking states, reasoning streams, streaming text, matrix dot loaders, or banner stacking. Triggers on "add a transition", "animate the dropdown", "make the modal open smoothly", "swap icon", "page slide", "stagger animation", "open / close transition", "make it animate", "fade between", "success animation", "form error", "shake on invalid", "hover lift", "avatar stack hover", "clear the search", "skeleton loader", "loading shimmer", "shimmer text", "sliding tabs", "segmented control", "tooltip", "reveal text", "tilt card", "3D hover tilt", "cursor glare", "plus to menu", "FAB morph", "accordion", "collapsible", "expand / collapse", "disclosure", "toast", "snackbar", "like button", "heart animation", "learn more arrow", "checkbox", "check animation", "spinning counter", "odometer", "slot machine digits", "toggle", "switch", "thinking states", "AI status line", "agent reasoning", "reasoning stream", "streaming text", "stream words in", "matrix loader", "dot loader", "banner stack", "stacked toasts". Also "motion tokens", "scan for ad-hoc transitions", "replace hardcoded durations with motion tokens", "tokenize my animations", and the commands transitions reveal, transitions review, transitions apply, transitions refine.

日本語の概要は準備中です。原文の説明を表示しています。

Jakubantalik/transitions.dev5,0812026年10月13日 更新

Polish and refine existing motion against the transitions.dev motion-token scale — duration, distance, scale, blur, and easing — plus the rules for WHEN each token applies (open/close asymmetry, hover-in vs hover-out, stagger offsets, and intent delays). An add-on to the transitions-dev skill, focused on tuning what already animates rather than adding new transitions. Use when the user asks to "polish my transitions", "refine the motion", "tune the timing / easing", "make the animation feel better / less janky", "tighten the durations", "fix the stagger", "align to the motion tokens", "audit the motion", "review my animations", "scan for ad-hoc transitions", "tokenize my animations", or runs the commands transitions review or transitions polish. Also drives the Refine panel's Small refinement feature. Triggers on "motion polish", "transition polish", "refine motion", "timing feels off", "too slow / too fast", "stagger", "delay", "open close timing", "hover in out".

日本語の概要は準備中です。原文の説明を表示しています。

Jakubantalik/transitions.dev5,0812026年10月13日 更新

Jakubantalik のスキルをすべて見る

このスキルの問題を報告する