Communitygithub.com

Landing Page Polish, step 2: premium UI details

Engineering-grade UI polish rules for any front-end stack: color-tier layering instead of borders, dark-mode weight compensation, streaming text, spring motion parameters and component selection boundaries.

What is Landing Page Polish, step 2: premium UI details?

Landing Page Polish recipe, step 2 (the finish). It hands the agent measurable rules: 1–3% background tiers instead of borders, shadow focus rings, lighter weights in dark mode, tabular numbers, grid-based collapse, balanced headings, spring presets per interaction, and a checklist of cheap-looking patterns to remove.

Works with~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/chensiyuan040-hash/skill/tree/HEAD/ui-polish

Ask in your favorite AI

Open a new chat with this agent skill pre-loaded.

Documentation

UI Texture Specification

The "premium feel" of the interface comes from quantifiable detail parameters. Follow this specification when writing styles and animations; in case of conflict with existing design tokens / AntD theme of the project, the project takes precedence. For dual themes, always use CSS variables scoped with html[data-theme], do not use light-dark() (compatibility pitfalls with older kernels).

I. Texture Laws

  1. Layered without borders: Express hierarchy with a 1%–3% brightness difference in background color shades; avoid pure black #000.
    • Light: page background #f5f5f3 / card #fcfcfb; Dark: #0b0b0a / #151515 / #1a1a19 / #20201e (hierarchy from deep to light)
    • For AntD projects, align with tokens (colorBgLayout/colorBgContainer), do not hardcode color values per component.
  2. Focus with shadows, not outlines: Use a double-ring box-shadow (inner ring solid stroke + outer ring low-opacity primary color glow) for input / card focus to create a "gripping" feel; remove default outline, but :focus-visible must retain a visible focus indicator.
  3. Dark mode font weight compensation: In dark mode, reduce font weight by one level (400→300, or precise 360 with variable fonts) to offset the halo effect of white text appearing bolder; switch via CSS variable with theme.
  4. Streaming typing ink bloom: 90ms per character, transitioning from blur(6px) + semi-transparent to clear, easing with cubic-bezier(.215,.61,.355,1), adjacent characters staggered by 30ms; prohibit hard per-character pop-ins or entire paragraph flash-in.
  5. Inline icon alignment: vertical-align: -0.125em, or wrap with flex + align-items: center.
  6. Anti-jitter numbers: For statistics / time / prices, always use font-variant-numeric: tabular-nums so width does not jump on refresh or change.
  7. Smooth fold: For height animations, do not calculate height with JS; use display: grid + grid-template-rows: 0fr → 1fr transition (inner element overflow: hidden).
  8. Anti-widow/orphan: Body text text-wrap: pretty, headings text-wrap: balance.
  9. Motion personality:
    • Drag / snap / positioning: overdamped spring (stiffness 1200 / damping 80) or cubic-bezier(.2,0,0,1), zero bounce, one-shot lock.
    • Like / checkmark / success feedback: underdamped (380 / 18), one small bounce, springy.
    • Enter 150–250ms, exit 100–150ms, fast and restrained.
  10. Auto-dismiss feedback: Temporary feedback (e.g., copy / save) fades out automatically after 2–2.5s and reverts to original state; do not require manual user dismissal.

II. Cheap Feel Reverse Checklist (Self-Check)

Rework if any item is present:

  • Using 1px borders to delineate all regions; large areas of pure black/pure white background.
  • Browser default blue outline on focus.
  • Dark mode inherits light mode font weight (white text appears fat).
  • Streaming output with per-character hard pop-in or entire paragraph flash-in.
  • Numbers jump on change; all animations share the same ease, no fast/slow personality.
  • Temporary feedback never disappears, requires manual dismissal.
  • Non-informative decorative clutter: ALL-CAPS eyebrow headings, mid-dot separated strings, button suffix →, gradient glow everywhere.

III. Component Selection Boundaries (Overlays & Feedback)

ScenarioUseKey Points
Bottom half-screen content browsing with drag resizing (mobile)Bottom Sheet (AntD Drawer placement="bottom")Damped gesture, multi-snap, height three tiers peek/half/full ≈ 25/50/90%
Few mutually exclusive actions (mobile)Action SheetFlat buttons, independent cancel item, dangerous actions in red and separated from cancel
Lightweight toast after action, with undoSnackbar (AntD message + undo button)Bottom bar, timed auto-dismiss, undo must truly reverse the action
High-risk / blocking confirmationAlertDialog (AntD Modal)Lock background overlay; only irreversible actions disable Esc, others retain Esc
New feature / first-time guidanceTour (AntD Tour)Highlight positioning + step walkthrough, can skip
Image / media zoomLightbox (antd-image or custom)Scroll zoom, Esc to close
Form field validationInline Alert (AntD Form validation)Red text below input, real-time validation, disappears on fix; do not use global message for field errors

Blocking level from low to high: Snackbar < Inline Alert < Sheet < Action Sheet < Dialog. Desktop: prefer Modal/message. Mobile: prefer Sheet family. When in doubt, choose the less blocking option.

IV. Motion Personality Library (Use as Needed, Don't Stack All)

  • Completion feedback button: Click → collapse to circle → checkmark stroke drawn → particle burst, 300–400ms
  • Checkbox linkage: Check → progress ring grows + number scrolls + top background changes with progress
  • Stacked card expand: Card group expands sequentially (stagger 50ms per card), click again to collapse back
  • Snap card + line drawing: Horizontal swipe → snap to nearest card on release (spring 1200/80); on switch, draw timeline line segment-by-segment with stroke-dashoffset
  • Inertial scroll wheel: picker inertial rotation → decelerate → snap to tick; overscroll bounce back (underdamped 380/18)
  • Circular reveal transition: From finger / cursor press position, clip-path: circle() expands to fill, 400–500ms

Implementation: prioritize CSS transition/animation and Web Animations; spring parameters follow framer-motion semantics (stiffness/damping); all motions must have prefers-reduced-motion fallback (direct switch or fade-in is acceptable).

V. Delivery Self-Check

  • Layering via color shades, no pure black/pure white large background, no full borders dividing regions
  • Keyboard focus visible (double-ring shadow), touch targets ≥ 44px
  • Dark mode font weight compensated
  • Numbers tabular-nums; body text text-wrap: pretty
  • Motion two personality types, duration within specified range; prefers-reduced-motion fallback
  • Temporary feedback auto-dismiss 2–2.5s; form errors use inline hints

Sources

Parameters extracted from three Douyin videos (2026-10): Ludi "Dissecting big company AI client source code, texture relies on these 5 tricks" "6 hidden ace components", Watermelon "Episode 14: 6 interactions to make AI-built Apps more refined".

Individual skills in this repo

This repo contains 1 individual skill — each has its own dedicated page.

Related Skills