05 design button hierarchy

From gnurio/refactoring-ui-plugin · View interactive version

05 design button hierarchy is an AI agent skill from the GitHub repository gnurio/refactoring-ui-plugin. Create clear primary/secondary/tertiary action distinctions

How to use this skill

Skill file

Skill: Design Button Hierarchy

Purpose

Create clear distinctions between primary, secondary, and tertiary actions so users know which action to take.

Type

Generative + Evaluative

Input

Output

Transformation Performed

Maps action importance to visual treatment: primary = filled brand color, secondary = outline or subtle (including grey solid), tertiary = text-only or link style.

Decision Criteria

PASS (Good Button Hierarchy)

FAIL (Poor Button Hierarchy)

Button Style Patterns

| Level | Background | Border | Text | Use Case |

|-------|------------|--------|------|----------|

| Primary | Brand color (solid) | None | White/light | Main CTA, save, submit |

| Secondary | Grey (solid) or transparent | Brand color (if outline) | Brand color or grey | Alternative action, cancel |

| Tertiary | Transparent | None | Brand color or gray | Optional actions, learn more |

| Destructive | Red | None | White | Delete, remove (not competing) |

| Disabled | Gray 200 | None | Gray 400 | Cannot proceed |

Visual/UX Signals Used

  1. Fill vs outline: Filled = primary, outline = secondary
  2. Color saturation: More saturated = more important
  3. Size: Primary can be slightly larger
  4. Position: Primary often on right or bottom (reading pattern)

Common Failure Modes

| Failure | Description | Fix |

|---------|-------------|-----|

| Button Battle | Save and Cancel both filled brand | Make Cancel outline or grey solid |

| Gray Button Confusion | Very light grey (200) secondary looks disabled | Use grey 400-500 or outline, not near-white grey |

| Red Alert | Delete button more prominent than primary | Make delete text-only or smaller |

| Primary Overload | 3+ "primary" buttons | Choose one primary, demote others |

| Invisible Tertiary | Text links same color as body | Use brand color or underline |

Prerequisites

Dependencies

Refactoring UI References

Example Assessment

Input: Modal with "Save Changes" (filled blue), "Cancel" (filled grey), "Delete" (filled red)

Evaluation: PARTIAL

Recommendation:

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.