/ui:polish-interfacefrom Diorama UI
Polishes interfaces built with @bydiorama/ui by fixing spacing, radii, elevation, type, icon alignment, hit areas, and interaction states. Includes rules for concentric radii, shadow layering, motion timing, and optical alignment.
Ships in Diorama UI. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
The small details that make interfaces built with @bydiorama/ui feel
finished. These rules complement — never override — the system's binding
conventions (CONVENTIONS.md in bydiorama/ui) and its semantic tokens:
when a rule below names a value, use the token that carries it, not the number.
Adapted for the Diorama design system from "skills" by Jakub Krehel (github.com/jakubkrehel/skills) — © 2026 Jakub Krehel, MIT. The full licence and permission notice are at the end of this file: MIT requires both to travel with substantial portions, and a pointer to another repository's CREDITS.md travels nowhere.
Existing citations to “ui-craft rule N” and “craft rule N” refer to the numbered rules below. The rule numbers have not changed.
Slow the interface down: replay motion at 10% speed in the browser's Animations panel and walk every state — hover, focus, active, loading, empty. What feels off at 10% speed is what is subtly wrong at full speed.
outerRadius = innerRadius + padding. Equal radii on a card and the button
inside it is the single most common thing that makes a layout feel off.
Derive from the --ui-radius-* scale; never invent a radius.--ui-radius-2xl, unboxed content — a title, a field label, a row of
footer buttons — steps in by --ui-space-sm beyond the panel's own
padding, because text sitting flush crowds the corner arc. Boxed children
(an info well, an input, anything with its own fill or border) stay flush:
their edge already reads as an edge. Getting this backwards is what makes a
generously-rounded card feel cramped at the corners and loose in the middle.
Popover.Title and Popover.Description carry the inset for you.--ui-shadow-*). Keep borders
that communicate structure or state: dividers, separators, selection, focus.scale(var(--ui-press-scale)) — 0.96, exactly.
Below 0.95 feels exaggerated; above 0.97 is imperceptible. Components take
staticTap to opt out where even this is noise.--ui-stagger-step apart) is for first loads, success and empty
states — never for row hovers, keystrokes or repeated tab switches. The
attention cost of motion repeats on every trigger.translateY and a fade, not a
full-height collapse. --ui-ease-out both ways.opacity + slight scale), both icons in
the DOM — never a hard swap. Skip entrance animation on first render.
IconSwap is this rule as a component: a subtle dip (×0.8) with a
little blur reads as one glyph re-forming; a deep scale (×0.5) reads as a pop.--ui-motion-*,
--ui-duration-*, --ui-ease-*). Never a hard-coded ms. Never
transition: all — enumerate properties. The three motion levels are
handled at the token layer (--ui-motion-travel and --ui-enter-scale
for anything that enters or leaves); JS-driven animation asks
motionLevel() explicitly.
11a. Seamless means front-loaded, short and single. One strong ease-out
(--ui-ease-out, ADR 0030) for anything that settles; exits shorter than
entries and never delayed; the fade shorter than the move; 4–12px of
travel and never a scale from 0; a selection is one element travelling,
not two fills cross-fading; new content enters from the side of what was
chosen; a leaving row fades while its list closes, in one motion. A height
animation folds the padding with it, or the element stalls at its padding
and jumps shut.currentColor; hover,
selected and disabled states come from CSS colour and opacity, never
separate assets. Outline is the default; fill marks the active state.griddy-icons only.13a. Leave a Button at its default size (md) unless it sits inside
something already dense. Size follows the control's role: md for
every action in a composition (a card, a form, a dialog footer, a list's
add button), lg for a page's primary action, sm only inside a dense
part (table cell, icon toolbar, chip row). "Secondary" is a variant, not
a size; a denser screen is data-ui-density="compact", not size="sm".
Small buttons by instinct are the most common way a new composition
looks cramped (ADR 0029).
--ui-hit-area-min (24px); primary controls aim for --ui-hit-area-touch
(44px). The visible element may stay small — extend the hit area with a
pseudo-element on the wrapping label or button (replaced elements don't
render ::before/::after reliably).cursor: pointer on anything clickable — always, explicitly. No
browser gives <button> a pointer cursor by default, and no reset in this
stack adds one. It is the only signal a control is clickable before the
click, so a missing pointer reads as "this isn't a button". Disabled
controls get cursor: not-allowed.pointer-events: none. disabled
already blocks activation and removes the control from the tab order.
Killing pointer events on top of that only makes the control unhoverable,
which silently removes the tooltip that would explain why it is
unavailable. Gate hover/press styling behind enabled: instead.:active; Enter activates instantaneously, so the UA applies
:active for at most a frame. That is browser behaviour, not a bug worth
"fixing" with JS state — the focus ring is the static cue and the resulting
action is the acknowledgement. Rule 8 already requires a non-motion channel.Menu.Separator is 8px above and below with nothing painted, and it
still announces as role="separator". Grouping is the DIFFERENCE between
two gaps. Reach for a rule and you are usually solving a spacing problem
with ink.--ui-nav-hover-bg the day
a 48px rail had no label left to change weight.check:strokes fails the build on border-dashed, outline-dotted, a
dashed borderStyle or any stroke-dasharray.--ui-* roles, never raw values, never palette
names. One colour, one meaning: if the link colour shows up as decoration,
the decoration gets a neutral instead. Only the single primary action in a
view gets a filled accent background.Text stays off the GPU at rest. A persistent transform,
will-change or filter on a text-bearing element promotes it to a
compositor layer, where the glyphs are rasterised once and resampled —
permanently soft text. Transient motion is fine: press scale (rule 7) and
icon cross-fades (rule 10) end, and the text repaints sharp. The trap is
promotion that outlives the animation — a will-change left in place
"for performance", a translateZ(0) hack, a decorative filter on a
container that holds copy. Clear will-change when the animation ends
and keep filters on sibling layers, not on the text's ancestor. Leave
text-rendering at auto; smoothing itself is the app root's job
(CONVENTIONS §6), never a component's.
backdrop-filter is NOT in that list, and it used to be. The two
read alike and do opposite things to type: filter filters the element,
its own text included, while backdrop-filter filters only what is
BEHIND it and composites the element's content on top untouched.
Measured in Chromium on the affixed Header, whose backdrop-blur-sm
sits on the <header> carrying the nav labels:
| on a text-bearing element | glyph pixels changed |
|---|---|
backdrop-filter: blur(4px) | 0 — pixel-identical |
filter: blur(0.4px) | 9.31%, peak delta 139/255 |
So a translucent bar can have its blur and sharp labels both. Rule 23
banned a real technique on the strength of a plausible mechanism nobody
had measured — which is the failure the rule itself is about, one layer
up. Reach for backdrop-filter freely over a translucent ground; the
thing to still avoid over text is filter.
className={fx("glass")} — never a prop, never a restyle of its parts.
One glass surface and one lit action per view; emphasis everywhere is
none. The full guide is the apply-effects skill.For app motion wiring and reduced-motion settings, see animate-app-interactions. For a pixel comparison to a specific frame, use compare-ui-to-design.
The craft rules above are adapted from "skills" by Jakub Krehel (https://github.com/jakubkrehel/skills). Reproduced here rather than linked, because MIT requires the copyright notice and the permission notice to accompany substantial portions wherever they go — and this file is installed into other people's repositories.
MIT License
Copyright (c) 2026 Jakub Krehel
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
What SKILL.md sets; muted values are Claude Code's defaults
8 skills in this plugin
/animate-app-interactionsAnimate state changes in an app that consumes Diorama components. Use when a count, label, icon or list should animate, a transition does not replay, or an interaction must respect reduced motion./apply-effectsApply glass, grain, sheen, glow, shimmer, ink or shaders to Diorama components. Use when adding texture, emphasis, a gradient ground or a loading halo without changing the component API./build-demo-pageTurn a screen design into a scripted, interactive demo page. Use when storyboarding a UI walkthrough, animating a Paper mockup, or preparing component snippets and compositions for capture.npx claudepluginhub bydiorama/ui --plugin uiOther plugins' skills for the same job