algorithmic-color-pale…
Derive a full UI colour palette algorithmically from one or two brand colours. Darker and lighter variants for interactive states, desaturated greys from the…
Manage user expectations during wait times with appropriate loading states — from simple spinners to complex skeleton screens and staggered animations. Perceived performance is often more important than actual load time. Use when designing data-heavy components, handling API
$ npx -y skills add dembrandt/dembrandt-skills --skill loading-states-and-perceived-performance --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/loading-states-and-perceived-performanceContext preview
The summary Claude sees to decide when to auto-load this skill.
Manage user expectations during wait times with appropriate loading states — from simple spinners to complex skeleton screens and staggered animations. Perceived performance is often more important than actual load time. Use when designing data-heavy components, handling API
name: loading-states-and-perceived-performance
description: Manage user expectations during wait times with appropriate loading states — from simple spinners to complex skeleton screens and staggered animations. Perceived performance is often more important than actual load time. Use when designing data-heavy components, handling API calls, building hero sections, or improving the feel of a slow interface.
metadata:
priority: 7
pathPatterns:
- "components/**"
- "src/components/**"
- "**/*.tsx"
- "**/*.jsx"
- "**/*.css"
- "**/*.scss"
- "design-system/**"
promptSignals:
phrases:
- "loading state"
- "spinner"
- "skeleton screen"
- "skeleton loader"
- "perceived performance"
- "loading animation"
- "shimmer effect"
- "staggered loading"
- "prefetch"
- "prioritise loading"
- "progressive loading"
- "lazy load data"
retrieval:
aliases:
- loading states
- skeleton loaders
- spinners
- perceived performance
- shimmy
- glimmer
- prefetching
- priority loading
- progressive data loading
intents:
- design a loading state
- add a skeleton screen
- improve perceived performance
- choose between spinner and skeleton
- handle slow data loading
- adding delight to the wait
- load the most important content first
- prefetch the likely next step
examples:
- what loading state should this card use
- add a skeleton loader for this list
- make the page feel faster while loading
- design a spinner for this button
- load the key content first then stream the rest
- prefetch the next page so it feels instantUsers don't mind waiting as much if they understand *what* they are waiting for and *how much* progress is being made. Perceived performance is the design work of making a system feel faster than it actually is.
---
| Wait Duration | Best Pattern | Use for | |---|---|---| | **Short (< 1s)** | **Inline Spinner / Loader** | Button actions, small updates, quick data fetches | | **Medium (1s – 3s)** | **Skeleton Screen** | Cards, lists, dashboards, profile pages | | **Long (> 3s)** | **Determinate Progress Bar** | File uploads, complex exports, heavy processing | | **Full Page** | **Staggered Entry / Animated Sections** | Initial app load, hero sections, immersive transitions |
---
Use spinners for small, contained actions where the layout doesn't change significantly.
@keyframes spin {
0% { transform: rotate(0deg); }
100% { transform: rotate(360deg); }
}
.spinner {
animation: spin 800ms cubic-bezier(0.4, 0, 0.2, 1) infinite;
}---
Skeleton screens provide a visual placeholder that mimics the layout of the final content. This reduces "layout shift" (CLS) and signals to the user exactly where the content will appear.
A subtle, moving gradient that travels across the skeleton elements.
.skeleton {
background: var(--color-grey-100);
background-image: linear-gradient(
90deg,
rgba(255, 255, 255, 0) 0%,
rgba(255, 255, 255, 0.5) 50%,
rgba(255, 255, 255, 0) 100%
);
background-size: 200% 100%;
animation: shimmer 1.5s infinite;
}
@keyframes shimmer {
0% { background-position: -200% 0; }
100% { background-position: 200% 0; }
}---
For major page transitions or initial loads, use a coordinated animation strategy.
Instead of the whole page appearing at once, animate sections in a sequence. This guides the user's eye from the most important content (hero) down to secondary areas.
.section {
opacity: 0;
transform: translateY(10px);
animation: slide-up 400ms ease-out forwards;
}
/* Stagger by index */
.section:nth-child(1) { animation-delay: 100ms; }
.section:nth-child(2) { animation-delay: 200ms; }
.section:nth-child(3) { animation-delay: 300ms; }
@keyframes slide-up {
to { opacity: 1; transform: translateY(0); }
}For hero sections, you might use a more complex animation: 1. **Background image** fades in slowly. 2. **Heading** slides in with a slight overshoot (spring). 3. **CTA button** appears last with a crisp fade-in or subtle color transition.
---
Don't wait for everything before showing anything. Load in the order of **value to the user**, so the thing they came for appears first and the rest fills in around it. This is both a perceived-performance win and a code-efficiency one: you fetch and render less up front.
UX and design-system skills for AI agents. Install once, and your agent knows how to design. --all installs every skill at once. They load only when a prompt needs them, so there is no runtime cost to having them all. Want to pick by hand?
Repo: dembrandt/dembrandt-skills
Derive a full UI colour palette algorithmically from one or two brand colours. Darker and lighter variants for interactive states, desaturated greys from the…
The persistent shell around an application — the top bar, the app launcher, the tenant and environment cue, and in heavy tools a status bar. In an estate of…
Product visuals — hero shots, demos, screenshots, landing-page panels — must reproduce the real product, not a stylised poster of it. Design with real content…
A brand's visual tone — playful or serious, rounded or angular — should be consistent across all UI elements. Shape language in typography, border-radius, and…
Every interactive element needs a complete set of visual states — rest, hover, active/pressed, focus, disabled, and loading. States should be derived…
Rebuild an existing web page 1:1 from measurement instead of by eye — into Figma, Penpot, or code. Captures the rendered page, the raw source and the computed…