Chuyển đến nội dung
Skillpedia
Giao diện (UI/UX)48k · #6087

ux-feedback

Skill này làm gì

Công cụ này thêm các thông báo trạng thái quan trọng để người dùng biết điều gì đang xảy ra. Nó hiển thị khi nội dung đang tải, khi có lỗi, khi không có gì để hiển thị, hoặc khi một thao tác đã hoàn thành thành công.

Khi nào nên dùng

  • ✓Khi một trang hoặc phần nội dung tải quá lâu.
  • ✓Khi một thao tác của người dùng bị lỗi và cần thông báo lỗi.
  • ✓Khi danh sách trống và người dùng cần gợi ý nên làm gì.

Liên kết skill

https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/ux-feedback/SKILL.md

Sao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.

Cách dùng

Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.

Tin nhắn có sẵn để dán

Hãy dùng skill này để giúp tôi: https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/ux-feedback/SKILL.md Đọc tệp SKILL.md tại liên kết đó và làm theo hướng dẫn cho việc của tôi.
Bạn muốn AI tự tìm những skill như thế này?Cài MCP Skillpedia miễn phí: chỉ một dòng, và AI sẽ tìm trong 15.000+ skill trước mỗi việc.Cài đặt trong 1 phút →

Ví dụ cách nhờ AI

“Hãy thêm các trạng thái phản hồi cho người dùng ở phần hồ sơ cá nhân.”

5 skill mới mỗi tuần. Đọc chỉ 1 phút.

Cách hoạt động

Công cụ phân tích mã của bạn để tìm chỗ hiển thị dữ liệu. Sau đó, nó tự động thêm đoạn mã cần thiết để hiện các thông báo ‘đang tải’, ‘trống’, ‘lỗi’ hoặc ‘thành công’ ở những chỗ đó.

Nội dung kỹ thuật (SKILL.md gốc)

Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.

UX Feedback States Generator

When to Use

Use this skill when you need add appropriate user feedback states (loading, success, error, empty) to a component or page.

When NOT to use

  • For only the words inside a state → use /ss-copy
  • For accessibility issues in existing states → use /ss-a11y
  • For brand-new component creation → use /ss-component
  • For analytics or error-logging plumbing — UI presentation only

Target: $ARGUMENTS

Instructions

  1. Read the target file and identify all data-dependent areas.

  2. Read the design language reference:

    • DESIGN-LANGUAGE.md sections on Loading States (Skeleton), Empty States, Error States
  3. For each data-dependent area, implement ALL 4 states:

State 1: Loading (Skeleton)

// Skeleton must match the final layout shape
<div className="bg-card rounded-2xl p-6 shadow-[var(--shadow-card)]">
  <div className="flex items-center gap-2 mb-3">
    <div className="size-7 bg-surface-muted rounded-lg animate-pulse" />
    <div className="h-3 w-16 bg-surface-muted rounded animate-pulse" />
  </div>
  <div className="h-9 w-24 bg-surface-muted rounded-lg animate-pulse mb-3" />
  <div className="h-3 w-12 bg-surface-muted rounded animate-pulse" />
</div>

Rules:

  • Show skeleton for 300ms minimum (prevent flash)
  • Delay skeleton display by 300ms (fast loads skip skeleton entirely)
  • Use animate-pulse (1.5s cycle)
  • Match skeleton shapes to real content dimensions
  • Never use spinners inside cards

State 2: Empty (Zero Data)

<EmptyState
  icon={PackageIcon}
  title="No activity yet"
  description="Create your first project to get started."
  action={<Button>Create Project</Button>}
/>

Rules:

  • Center-aligned in the card
  • Icon: 32px, text-text-tertiary
  • Title: 14px, text-text-secondary
  • Always suggest a next action
  • Zero values show as "0" (don't hide or dash)

State 3: Error (Load Failed)

<div className="flex flex-col items-center justify-center py-8 text-center">
  <AlertCircle className="size-8 text-destructive mb-3" />
  <p className="text-[14px] text-text-secondary mb-4">Couldn't load the data</p>
  <Button variant="brandGhost" size="sm" onClick={retry}>Try again</Button>
</div>

Rules:

  • Partial failure: only affected card shows error, rest loads normally
  • Full page failure: full-screen EmptyState with retry
  • Error message: plain language, blame the system
  • Always provide retry button

State 4: Success (Action Feedback)

// Toast notification for action confirmations
toast("Changes saved")

// With undo for destructive actions
toast("Item deleted", { action: { label: "Undo", onClick: handleUndo } })

Rules:

  • Info toast: 3s display
  • Action toast (with undo): 5s display
  • Toast position: above BottomNav
  • One toast at a time (new replaces old)
  1. Implementation pattern:
function DataCard({ data, isLoading, error }) {
  if (isLoading) return <DataCardSkeleton />
  if (error) return <DataCardError onRetry={refetch} />
  if (!data || data.length === 0) return <DataCardEmpty />
  return <DataCardContent data={data} />
}
  1. Check prefers-reduced-motion — disable animate-pulse when reduced motion is preferred.

Limitations

  • Use this skill only when the task clearly matches its upstream source and local project context.
  • Verify commands, generated code, dependencies, credentials, and external service behavior before applying changes.
  • Do not treat examples as a substitute for environment-specific tests, security review, or user approval for destructive or costly actions.
Câu hỏi thường gặp

‘Trạng thái phản hồi’ là gì?

Đó là các chỉ báo và thông báo trực quan giúp giao diện cho người dùng biết điều gì đang diễn ra, ví dụ vòng quay khi đang tải hoặc dòng chữ ‘không tìm thấy’.

Vì sao các trạng thái này quan trọng?

Chúng giúp giao diện rõ ràng và dễ hiểu hơn. Người dùng biết điều gì sẽ xảy ra và nên làm gì tiếp theo, tránh bối rối.

Công cụ này có làm thay đổi giao diện website của tôi không?

Công cụ dùng kiểu dáng có sẵn phù hợp với thiết kế hiện tại, tập trung vào sự rõ ràng và chức năng, không thay đổi nhiều diện mạo.

Chi tiết

Mô tả gốc của tác giả

Add appropriate user feedback states (loading, success, error, empty) to a component or page

repo: sickn33/agentic-awesome-skills

Độ phổ biến

Sao GitHub
48k
Vị trí xếp hạng
#6087
Giấy phép
MIT
Cập nhật
15/10/2026

Skill này có hữu ích không?

0

Đăng nhập để bình chọn.

Bình luận

  • …

Thêm skill từ kho mã này

Skill tương tự