Loading States And Perceived Performance 标志

Loading States And Perceived Performance

组织
dembrandt
loading-states-and-perceived-performance

Spinners, skeletons and staggered reveals that manage wait times. Use when designing loading states, async data or the feel of a slow interface.

Add to TypingMind

概览

发布者dembrandt
代码仓库dembrandt-skills
技能名称loading-states-and-perceived-performance
星标数
169
复刻数
21
附带文件
仅含指令
许可协议MIT
链接
  • Markdown 格式的指令

    模型按需加载 SKILL.md 文件,因此只有在请求确实与该技能匹配时才会消耗 Token。

  • 兼容任何大语言模型

    AI 技能采用纯 Markdown,而非特定提供商的代码,因此可搭配 GPT、Claude、Gemini、Grok 或本地模型使用。

  • 指令自成一体

    模型所需的一切都包含在指令中,无需同步额外文件。

  • 开源

    由 dembrandt 发布于 GitHub。请在安装前查看技能的源文件。

安装

在 TypingMind 中安装 Loading States And Perceived Performance AI 技能,即可搭配任意大语言模型使用;也可以将其放入其他支持读取 SKILL.md 的智能体中。

1

安装到 TypingMind

TypingMind 可直接从 GitHub 文件夹安装技能:读取 SKILL.md,打包资源文件,并将结果保存在本地。

  1. 打开应用,前往“插件 → 技能”。
  2. 选择“从 GitHub 安装”。
  3. 粘贴下方的技能文件夹 URL 并确认。
    https://github.com/dembrandt/dembrandt-skills/tree/main/skills/loading-states-and-perceived-performance
  4. 请在每个需要使用该技能的聊天中启用它。
依次选择“插件 → 技能 → 添加技能 → 从 GitHub URL 导入”,然后粘贴文件夹 URL 并点击“继续”。
2

安装到其他智能体

任何支持 Agent Skills 格式的智能体都可以使用此技能,只需将文件夹复制到该智能体的技能目录中。

Claude Code — .claude/skills
git clone --depth 1 https://github.com/dembrandt/dembrandt-skills.git /tmp/dembrandt-skills
mkdir -p .claude/skills
cp -r /tmp/dembrandt-skills/skills/loading-states-and-perceived-performance .claude/skills/loading-states-and-perceived-performance
复制后,请重启 Claude Code,以加载新技能。

在 TypingMind 中使用此技能

在任意 TypingMind 聊天中启用 Loading States And Perceived Performance,后续即可交由模型处理。技能的名称和描述会放在系统提示词中,一旦请求匹配,模型就会自动加载完整指令,无需您手动调用,且在实际使用前不会消耗 Token。

一旦请求与技能匹配,模型就会自动加载 Loading States And Perceived Performance。

兼容任何 AI 模型

AI 技能是纯 Markdown 指令,而非特定提供商的代码,因此 Loading States And Perceived Performance 不局限于最初适配的模型。只需在 TypingMind 中安装一次,即可搭配 GPT-5、Claude、Gemini、Grok、DeepSeek、Mistral、Llama 或您自行运行的本地模型使用,全程使用您自己的 API 密钥。

  • 仅在需要时加载

    系统提示词中仅包含技能名称和描述。首次遇到匹配的请求时才会加载完整指令,因此技能未使用时,这些指令不会消耗 Token。

  • 在聊天中切换模型

    技能是指令而非代码,因此切换模型不会导致技能失效,新模型会读取同一个 SKILL.md。

技能指令

这是模型会加载的 SKILL.md 内容。请在安装前阅读,因为技能就是模型将遵循的指令。

Loading States and Perceived Performance

Users 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.


Choosing the Right Loading State

Wait DurationBest PatternUse for
Short (< 1s)Inline Spinner / LoaderButton actions, small updates, quick data fetches
Medium (1s – 3s)Skeleton ScreenCards, lists, dashboards, profile pages
Long (> 3s)Determinate Progress BarFile uploads, complex exports, heavy processing
Full PageStaggered Entry / Animated SectionsInitial app load, hero sections, immersive transitions

Simple Cases: Spinners and Loaders

Use spinners for small, contained actions where the layout doesn't change significantly.

  • Button Spinners: Replace button text or sit alongside it. The button should enter a disabled state to prevent double-submissions.
  • Micro-Loaders: A small 16–24px circle for inline updates (e.g., saving a single field).
  • Animation Tip: A "spring-loaded" rotation (easing in and out) feels more premium than a constant linear rotation.
css
@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 (Glimmer/Shimmer)

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.

The Shimmer Effect

A subtle, moving gradient that travels across the skeleton elements.

css
.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; }
}

Rules for Skeletons

  • Match the shape: If the final content is a round avatar, use a round skeleton. If it's a 2-line heading, use two bars of varying widths.
  • Stay Recessive: Skeletons should use your most subtle grey (--color-grey-100 or grey-50). They should not draw focus.
  • Fade into Reality: When data arrives, fade the actual content in over the skeleton (150–200ms) rather than snapping.

Fully Animated Sections

For major page transitions or initial loads, use a coordinated animation strategy.

Staggered Entry (Cascading)

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.

css
.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); }
}

Hero Section "Bloom"

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.

Load in Priority Order — and Prefetch What's Next

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.

  • First, the highest-value content — the key figure, the primary record, the above-the-fold answer. Render it the moment it's ready.
  • Then the next tier, then the next — secondary panels, related lists, and below-the-fold sections stream in behind it (skeletons hold their space so nothing shifts — see the skeleton section above).
  • Fetch only what the current view needs. Defer data for tabs, drawers, and off-screen sections until they're opened, rather than loading the whole page's worth of data at once.

Prefetch the predictable next step — next page, a hovered row's detail, the next wizard step — in the background so it's instant. Don't speculatively load everything; only where there's an obvious next move.

Advanced: Optimistic UI

The fastest UI is one that doesn't wait for the server at all.

  • The Pattern: Update the UI immediately assuming the server call will succeed. If it fails, roll back and show an error.
  • Use for: Liking a post, toggling a switch, renaming a folder, deleting a message.
  • Benefit: Instant gratification for the user, making the app feel "lightning fast."

Adding Delight to the Wait

Loading doesn't have to be a neutral experience. For waits longer than 2 seconds, consider adding brand personality and "delight" to keep the user engaged.

Brand-Aligned Micro-copy

Replace generic "Loading..." text with wording that reflects the brand's voice.

  • Technical: "Compiling data...", "Syncing with cloud..."
  • Playful: "Gathering pixels...", "Brewing your dashboard...", "Almost there!"
  • Professional: "Preparing your report...", "Verifying details..."

Branded Animations (Lottie/SVG)

For significant loading moments (initial app boot, complex data processing), replace the standard spinner with a small, brand-specific animation.

  • A designer's tool might show a pencil drawing a line.
  • A fitness app might show a pulsing heart or a moving runner icon.
  • A financial tool might show coins stacking or a chart line moving upward.

Progressive Storytelling

If a wait is consistently long (3s+), use the loading area to tell a small story or provide value:

  • Tips & Tricks: "Did you know you can use Ctrl+K to search?"
  • Process Transparency: Show what the system is doing: "Checking database..." → "Optimising results..." → "Finalising view..."

Visual Transitions (Arrival)

When transitioning from a loading state to content, use a crisp fade-in (150ms) to make the arrival feel like a reward. Avoid scaling the incoming content, as it can cause layout instability.

The Cursor Is Not a Loading State

The cursor signals affordance: the arrow for ordinary content, pointer for something that can be acted on. It never signals progress. A cursor: wait or cursor: progress puts the status where the user is not looking, says nothing about what is loading or how far along it is, and disappears the moment the pointer moves. Show progress in the element or region that is actually waiting, which [[button-states]] covers for a control and the skeleton and progress patterns above cover for a region.

What a Loading State Cannot Do

A loading state buys patience. It does not buy time, and it cannot rescue a request that is going to fail. The thresholds below are the long-established response-time limits, not a new finding; what follows from them is the part usually skipped.

  • Up to about 10 seconds: a spinner or skeleton carries the wait.
  • Beyond that: the interface needs real progress and a way to cancel. An indeterminate animation has stopped being information and become decoration over an unknown.
  • Past about 30 seconds: people read the application as stuck whatever is animating, and start reloading or leaving.

When a request routinely crosses those thresholds, the fix is the request. If it is heading for a backend timeout, a richer indicator only delays the error the user was always going to get, while hiding from the team that the product is broken. The spinner moves the failure later, so nobody fixes the cause, and people abandon the task anyway.

When the wait is genuinely irreducible, the fix is not the request either. A large export, a model call, a video transcode: some work takes the time it takes, and no indicator shortens it. There the answer is to take the work out of the view. Accept the job, tell the user it is running, release them to do something else, and notify them when it lands, with the result waiting somewhere they can find it. Holding a person in front of a progress bar for two minutes is a choice, and it is rarely the one they would make. The failure to avoid is treating an irreducible wait as a performance bug and an optimisable one as a fact of life; they need opposite responses, so decide which you have before you design the wait.


Review Checklist

  • Is the loading state appropriate for the expected wait duration (spinner vs skeleton)?
  • Does the skeleton screen match the physical layout of the incoming content?
  • Is there a subtle shimmer animation on skeletons to signal "active loading"?
  • Are buttons disabled during loading to prevent duplicate actions?
  • Does content fade in over skeletons (150–200ms) rather than blinking into existence?
  • For full-page loads, is a staggered entry used to guide the eye?
  • Is prefers-reduced-motion respected for all loading animations?
  • In "Optimistic UI" moments, is there a clear rollback path if the action fails?
  • Does content load in priority order (highest-value first, rest streaming in), fetching only what the current view needs rather than everything up front?
  • Where the next step is predictable, is it prefetched so it feels instant — without speculatively loading everything?

Common Anti-Patterns

Anti-patternProblemFix
A global spinner that blocks the whole appHigh frustration, user cannot browse other areasUse contextual loaders or skeletons
Skeletons that don't match the final layoutMassive layout shift (CLS) when data arrivesMatch shapes and sizes exactly
Too many spinners on one pageVisual noise, feels like the whole app is brokenGroup loading states into a single container skeleton
Faster-than-light skeletonsShimmer animation that is too fast or high-contrastKeep shimmer slow (1.5s+) and very subtle

常见问题

Loading States And Perceived Performance AI 技能有什么作用?

Spinners, skeletons and staggered reveals that manage wait times. Use when designing loading states, async data or the feel of a slow interface.

为什么在 TypingMind 中使用 Loading States And Perceived Performance?

因为您只需安装一次,就能搭配任何模型使用。Loading States And Perceived Performance 采用纯 Markdown 格式,而非特定提供商专用的代码,因此同一技能可用于 GPT-5、Claude、Gemini、Grok 或本地模型。您甚至可以在聊天中途切换模型,而不会影响技能的正常使用。TypingMind 使用您自己的 API 密钥,因此您直接向提供商付费,而不是按席位订阅;您的技能和聊天记录也都保留在您自己的存储空间中。

如何在 TypingMind 中安装 Loading States And Perceived Performance?

在 TypingMind 中打开“插件 → 技能 → 从 GitHub 安装”,然后粘贴 https://github.com/dembrandt/dembrandt-skills/tree/main/skills/loading-states-and-perceived-performance。TypingMind 会读取其中的 SKILL.md,并将其安装为技能,供您在各个聊天中按需启用。

哪些 AI 模型可以使用 Loading States And Perceived Performance?

您在 TypingMind 中连接的任何模型都可以。AI 技能采用纯 Markdown 指令,而非特定提供商专用的代码,因此 GPT、Claude、Gemini、Grok 和本地模型都能在请求匹配时加载此技能。

Loading States And Perceived Performance 可以搭配多少个 AI 模型使用?

数量不限。只要模型支持技能,您就可以将它与 Loading States And Perceived Performance 搭配使用。GPT、Claude、Gemini、Grok、DeepSeek、Mistral、Llama 等模型都可以通过您自己的 API 密钥接入 TypingMind。

Loading States And Perceived Performance AI 技能免费吗?

是的。dembrandt 已在 GitHub 上根据 MIT 许可证发布了该技能。您只需向自己的 AI 提供商支付所用 Token 的费用。

什么是 AI 技能?

AI 技能是一组可复用的指令,用于教会 AI 模型完成某项特定任务。它遵循开放的 Agent Skills 格式:包含名称和描述的 SKILL.md 文件,以及模型可能需要的脚本、模板或参考文件。模型仅在您的请求与技能匹配时才会读取这些指令,因此已安装的技能在使用前不会产生任何费用。

AI 技能与插件或 MCP 服务器有何不同?

插件或 MCP 服务器为模型提供可调用的新工具,也就是在某处运行并返回结果的代码。AI 技能则为模型提供知识和流程:如何处理任务、遵循哪些步骤,以及怎样的输出才算优质。技能采用纯 Markdown 格式,因此不需要服务器、API 密钥或运行时环境,并且适用于任何模型。

查看全部

立即创建您自己的 AI 工作区

订阅我们的电子简报,获取新功能和后续赠奖活动的通知 👇