ui-design

Opinionated constraints for building better interfaces with agents. Use when building UI components, implementing animations, designing layouts, reviewing frontend accessibility, or working with Tailwind CSS, motion/react, or accessible primitives like Radix/Base UI.

Safety Notice

This listing is imported from skills.sh public index metadata. Review upstream SKILL.md and repository scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "ui-design" with this command: npx skills add ckorhonen/claude-skills/ckorhonen-claude-skills-ui-design

UI Design

Opinionated constraints for building better interfaces with agents.

When to Use

  • Building UI components with Tailwind CSS
  • Implementing animations or transitions
  • Adding interactive elements with keyboard/focus behavior
  • Reviewing frontend code for accessibility
  • Designing layouts with proper z-index and spacing
  • Working with loading states, error handling, or empty states

Stack

RequirementRule
Tailwind CSSMUST use defaults (spacing, radius, shadows) before custom values
Animation libraryMUST use motion/react (formerly framer-motion) for JS animation
CSS animationSHOULD use tw-animate-css for entrance and micro-animations
Class logicMUST use cn utility (clsx + tailwind-merge)

Components

RequirementRule
Interactive primitivesMUST use accessible primitives (Base UI, React Aria, Radix) for keyboard/focus behavior
Existing componentsMUST use project's existing primitives first
ConsistencyNEVER mix primitive systems within the same interaction surface
New primitivesSHOULD prefer Base UI if compatible with stack
Icon buttonsMUST add aria-label to icon-only buttons
Custom behaviorNEVER rebuild keyboard or focus behavior by hand unless explicitly requested

Interaction

RequirementRule
Destructive actionsMUST use AlertDialog for destructive or irreversible actions
Loading statesSHOULD use structural skeletons
Viewport heightNEVER use h-screen, use h-dvh
Fixed elementsMUST respect safe-area-inset
Error displayMUST show errors next to where the action happens
Input behaviorNEVER block paste in input or textarea elements

Animation

RequirementRule
DefaultNEVER add animation unless explicitly requested
Compositor propsMUST animate only transform, opacity
Layout propsNEVER animate width, height, top, left, margin, padding
Paint propsSHOULD avoid background, color except for small, local UI (text, icons)
Entrance easingSHOULD use ease-out on entrance
Feedback timingNEVER exceed 200ms for interaction feedback
LoopingMUST pause looping animations when off-screen
AccessibilityMUST respect prefers-reduced-motion
Custom easingNEVER introduce custom easing curves unless explicitly requested
Large surfacesSHOULD avoid animating large images or full-screen surfaces

Typography

RequirementRule
HeadingsMUST use text-balance
Body textMUST use text-pretty for paragraphs
DataMUST use tabular-nums
Dense UISHOULD use truncate or line-clamp
Letter spacingNEVER modify letter-spacing (tracking-) unless explicitly requested

Layout

RequirementRule
Z-indexMUST use a fixed scale (no arbitrary z-x)
Square elementsSHOULD use size-x instead of w-x + h-x

Performance

RequirementRule
Blur effectsNEVER animate large blur() or backdrop-filter surfaces
Will-changeNEVER apply will-change outside an active animation
useEffectNEVER use for anything expressible as render logic

Design

RequirementRule
GradientsNEVER use unless explicitly requested
Purple/multicolor gradientsNEVER use
Glow effectsNEVER use as primary affordances
ShadowsSHOULD use Tailwind CSS default scale unless explicitly requested
Empty statesMUST give one clear next action
Accent colorsSHOULD limit to one per view
Color tokensSHOULD use existing theme or Tailwind CSS tokens before introducing new ones

Quick Reference

Allowed Animation Properties

transform, opacity

Forbidden Animation Properties

width, height, top, left, margin, padding, blur(), backdrop-filter

Required Accessibility Patterns

// Icon button - always add aria-label
<button aria-label="Close dialog">
  <XIcon />
</button>

// Respect reduced motion
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; }
}

Class Utility Pattern

import { clsx } from 'clsx';
import { twMerge } from 'tailwind-merge';

export function cn(...inputs: ClassValue[]) {
  return twMerge(clsx(inputs));
}

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

Automation

agent-browser

No summary provided by upstream source.

Repository SourceNeeds Review
General

video-editor

No summary provided by upstream source.

Repository SourceNeeds Review
General

markdown-fetch

No summary provided by upstream source.

Repository SourceNeeds Review
General

ios-app-tester

No summary provided by upstream source.

Repository SourceNeeds Review