Skip to content
Back to skills

Ui Design

ASecurity

Visual UI design in code — hierarchy and emphasis, spacing scale and proximity grouping, type scale and readability, colour roles, elevation, the interactive state contract (hover, active, focus-visible, disabled, loading, error, selected), component geometry (nested radius, control heights, icon insets, button rows), empty and loading states, responsive layout. Use to build or review how a screen or component looks and behaves, applying the design system and filling its gaps (UI design, visu...

  • 5 stars
  • 0 votes
  • 2 copies
  • 7 views
  • Added December 4, 2026
ai-agentsgoexpresstestingfrontend

Security analysis

A100/100

Pro scans all 2 files and shows the line behind each finding

Scanned December 4, 2026

npx -y skills add vectora-os/kit --skill ui-design --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Ui Design?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Ui Design
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/vectora-os-ui-design/badge)](https://www.skillsdirectory.com/skills/vectora-os-ui-design)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: ui-design
description: Visual UI design in code — hierarchy and emphasis, spacing scale and proximity grouping, type scale and readability, colour roles, elevation, the interactive state contract (hover, active, focus-visible, disabled, loading, error, selected), component geometry (nested radius, control heights, icon insets, button rows), empty and loading states, responsive layout. Use to build or review how a screen or component looks and behaves, applying the design system and filling its gaps (UI design, visual hierarchy, spacing, typography, design tokens, component states, UI polish).
metadata:
  category: quality
---

# UI design

## Purpose

Make screens that read in the right order, look consistent and respond visibly to every interaction — without a designer on every task. The design system gives the values; this skill gives the rules for applying them and for deciding when the design system is silent.

**Use when:** implementing or reviewing a screen or component, filling gaps in a design system, polishing a UI before review.

**Not for:** accessibility conformance (`accessibility` — it wins every conflict with visual preference), building or governing the design system itself (`design-system`), frontend structure and rendering (`web-frontend-architecture`), product copy and requirements (`product-requirements`).

## Inputs

- The screen or component, its purpose and primary action.
- The project's design system or tokens, if the project has one (for example `DESIGN.md`, a theme file or a token package).
- Target viewports and input modalities (pointer, touch, keyboard).
- On native mobile: the platform's interface guidelines and system controls count as part of the design system; rules that name CSS apply to web only, their intent applies everywhere (for example font scaling instead of zoom).

## Outputs

- An implementation that uses only design-system values, or a review with findings per rule and `file:line`.
- A list of gaps where the design system is silent, raised as questions for the owner.

## Read first

- [Project Brain](../../../project-brain/README.md) — `npm run brain -- query "ui design"` for prior decisions, patterns and anti-patterns.
- [Accessibility standard](../../../standards/accessibility.md) — first in the order of precedence: accessibility standard, then the design system, then this skill.
- [Component rules and state contract](references/component-rules.md) — the checklist used in steps 5–7.
- The project's design system or tokens, if the project has one.

## Steps

1. **Tokens first.** Find the design system's scales for spacing, type, colour, radius, elevation and motion. Use only their values; a raw value (hex, px) appears only where no token exists, and that gap is reported.
   Done when every visual value in the change maps to a token or to a reported gap.
2. **Hierarchy.** Name the one primary action and the reading order. Express importance with weight, colour and spacing before size; de-emphasise secondary content instead of enlarging the primary. One primary button per view or section; the rest are secondary or tertiary.
   Done when the screen has one visual entry point and at most one primary action per section.
3. **Spacing and grouping.** Use the spacing scale only. Related items sit closer than unrelated ones: the gap inside a group is smaller than the gap between groups, and a heading sits closer to its content than to the content above it. Separate with space before adding lines or boxes.
   Done when every gap is a scale step and group boundaries are visible without borders.
4. **Type and colour.** Use the type scale with a small number of distinct levels; heading size follows visual role, heading level follows document structure. Body text keeps a readable line length and line height; long text is never centred. Colour has roles (text, muted text, surface, border, accent, status); colour as a cue follows `accessibility` step 3.
   Done when type levels and colours come from named roles.
5. **States.** Every interactive element implements the state contract in the [references](references/component-rules.md#state-contract): rest, hover, active, focus-visible, disabled, plus loading, error, success and selected where they apply. States differ by more than colour where the meaning matters.
   Done when each interactive element has every applicable state, and focus-visible is distinct from hover.
6. **Component geometry.** Apply the [component rules](references/component-rules.md#component-rules): nested radius, matching heights in control rows, balanced icon insets, button labels on one line, visible fields on same-colour surfaces, styled native selects.
   Done when the component rules checklist passes.
7. **Content states and layout.** Design the empty, loading, error and overflow (long text, many items) states, not only the happy path. Layout starts from the smallest viewport; breakpoints follow content, components adapt to their container, hover is never the only way to reach anything; resize and reflow follow `accessibility` step 4.
   Done when each state is rendered at the smallest and largest target viewport.
8. **Verify.** Screenshot the result at the target viewports in light and dark themes, if the project has both; tab through it; compare against the design system and the [references](references/component-rules.md).
   Done when screenshots are attached and each finding cites the rule and `file:line`; where the project has screenshot tests, the changed states are covered (`visual-regression-testing`).

## Best practices

- Fewer, stronger contrasts: one accent, one primary action, muted everything else.
- Elevation means something (a menu floats above content, a dialog above everything); shadows come from one light direction.
- Skeletons that match the final layout over spinners for content areas.
- When a rule here conflicts with the design system, the design system wins and the conflict is reported; when the design system fails the accessibility standard, the standard wins and the token is reported to the owner.

## Common mistakes

- A second, invented size or colour next to an existing token.
- Equal spacing everywhere, so groups do not read as groups.
- Several primary buttons competing in one view.
- Hover styles without focus-visible styles; disabled indicated only by lower opacity on a coloured background.
- Reusing the parent's corner radius on a padded child.
- Buttons that shrink in a flex row, or a button row that overflows instead of wrapping.

## Example

Checkout summary: "Pay" and "Apply coupon" were both filled → coupon changed to secondary; coupon field had its own height next to the button → height taken from the button token; the button row overflowed on a 320 px screen → row stacks at narrow widths; promo banner radius 12 with padding 12 had a rounded image at 12 → image corners set to 0; the empty cart showed nothing → empty state with a link back to the catalogue.

## Reusable prompt

```text
Apply the UI design skill (.agents/skills/ui-design/SKILL.md).
Context: {{screen or component; design system or token paths; target viewports}}
Constraints: {{allowed files; approved design documents}}
Implement or review the UI: tokens only, one primary action, spacing by grouping, the full state contract and the component rules.
Return: the change or findings per rule with file:line, screenshots, and design-system gaps as open questions.
```

## Checks

- [ ] No raw visual values where a token exists.
- [ ] One primary action per section.
- [ ] State contract complete for every interactive element.
- [ ] Component rules checklist passes.
- [ ] Empty, loading, error and overflow states exist.

## Out of scope

- WCAG conformance and assistive technology testing — `accessibility`.
- Tokens, the component library and its governance — `design-system`.
- Choosing a third-party component library — `architecture-decisions`.
- Rendering approach and frontend structure — `web-frontend-architecture`.

Files in this skill

  • SKILL.md7.9 KB
  • references/component-rules.md5.4 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.