antfu design

Skill

antfu-style design conventions, broadened. UnoCSS-first, class-based semantic tokens with dual light/dark for tooling and devtools UIs, plus design-read, anti-slop, and micro-interaction polish for landing pages and product surfaces. Use when building or refactoring any interface with UnoCSS.

Files15
  • @skills/antfu-design/README.md
  • @skills/antfu-design/SKILL.md
  • @skills/antfu-design/references/advanced-pattern-vocabulary.md
  • @skills/antfu-design/references/advanced-redesign-protocol.md
  • @skills/antfu-design/references/best-practices-anti-slop.md
  • @skills/antfu-design/references/best-practices-bias-correction.md
  • @skills/antfu-design/references/best-practices-class-utilities-over-attributify.md
  • @skills/antfu-design/references/best-practices-strict-rules.md
  • @skills/antfu-design/references/core-design-read.md
  • @skills/antfu-design/references/core-principles.md
  • @skills/antfu-design/references/core-starter-kit.md
  • @skills/antfu-design/references/core-tokens-and-combinations.md
  • @skills/antfu-design/references/features-data-presentation.md
  • @skills/antfu-design/references/features-floating-vue-overrides.md
  • @skills/antfu-design/references/features-micro-interactions.md
Use this when building interfaces with UnoCSS in any framework (React, Vue, Svelte, Solid, or plain HTML), from dense devtools panels to landing pages. Read core-design-read first to set the direction, then apply the token system plus the polish and anti-slop rules.

Core Rules

  • Use semantic shortcuts (bg-base, border-base, color-active, btn-action) instead of raw utility chains in markup.
  • Design light and dark mode together. Core tokens must work in both themes.
  • Name z-index layers (z-top-nav, z-panel-content, z-drawer-content). Do not use raw z values in templates.
  • Generate class-based utilities only (class="..."). Avoid Attributify syntax in generated code.
  • Keep icon/status class strings literal so UnoCSS can statically extract them (// @unocss-include when needed).
  • Use font-mono + tabular-nums for technical values (paths, SHAs, counters, timestamps, percentages).
  • For long paths and IDs, truncate visually but keep the full value in title.
  • Read the brief and set the three dials before choosing a look (core-design-read).
  • Borders for dense or structural surfaces, layered shadows for elevated ones (features-micro-interactions).
  • Zero em-dash and en-dash characters in any user-facing text (best-practices-anti-slop).

Starter shortcuts

A minimal semantic core. See core-starter-kit for the full uno.config.ts and base styles.
typescript
shortcuts: [
  {
    'color-base': 'color-neutral-800 dark:color-neutral-200',
    'bg-base': 'bg-white dark:bg-#111',
    'bg-secondary': 'bg-#eee dark:bg-#222',
    'border-base': 'border-#8882',

    'bg-active': 'bg-#8881',
    'color-active': 'color-primary-600 dark:color-primary-300',
    'border-active': 'border-primary-600/25 dark:border-primary-400/25',

    'btn-action': 'inline-flex items-center gap-2 rounded border border-base px2 py1 op75 hover:op100 hover:bg-active disabled:pointer-events-none disabled:op30!',
    'op-fade': 'op65 dark:op55',
    'op-mute': 'op30 dark:op25',

    'z-top-nav': 'z-60',
    'z-panel-content': 'z-70',
    'z-drawer-content': 'z-100',
  },
]

Core References

TopicDescriptionReference
Core PrinciplesSemantic tokens, dark mode parity, z-index naming, class-first outputcore-principles [blocked]
Starter KitCopy-paste UnoCSS starter config and base light/dark stylescore-starter-kit [blocked]
Tokens and CombosToken families, reusable class combinations, mobile-safe shell tokenscore-tokens-and-combinations [blocked]
Design Read and DialsRead the brief, declare a design read, set variance/motion/density dialscore-design-read [blocked]

Best Practices

TopicDescriptionReference
Strict Rules and Pre-FlightDo/don't checklist and the consolidated pre-flightbest-practices-strict-rules [blocked]
Class over AttributifyWhy generated code uses class utilities, with conversionsbest-practices-class-utilities-over-attributify [blocked]
Anti-Slop HygieneThe dash ban and the AI-tell forbidden patternsbest-practices-anti-slop [blocked]
Bias CorrectionTypography, color, layout, and materiality defaults to overridebest-practices-bias-correction [blocked]

Features

TopicDescriptionReference
Data PresentationPaths, icons, time, date, numbers, badges, buttonsfeatures-data-presentation [blocked]
Micro-InteractionsRadius, alignment, shadows, animation, numbers, outlines, hit areasfeatures-micro-interactions [blocked]
Floating Vue OverridesShared Floating Vue setup and popper stylingfeatures-floating-vue-overrides [blocked]

Advanced

TopicDescriptionReference
Pattern VocabularyNamed UI patterns to recognize and reach foradvanced-pattern-vocabulary [blocked]
Redesign ProtocolDetect mode, audit first, preserve IA and SEOadvanced-redesign-protocol [blocked]
antfu-design — Kortix Marketplace | Kortix