Index of every page on this site: llms.txt
All skills
harlan-zw avatar

/nuxt-frontend-design

@9c94eb4
Run it yourself

Build or polish Nuxt UI v4+ pages and design systems. Use for landing pages, dashboards, tokens, motion, or generic-looking UX.

Use this Skill: https://skilld.dev/gh/harlan-zw/harlan-agent-kit/nuxt-frontend-design

Nothing lands on disk. Nothing to clean up.

Fork this Skill

Edit a local copy. It keeps the author and licence.

referencespolishresponsive.md

≈855 tokens on demand. Your agent reads this file only when SKILL.md points to it.

Responsive Design

Mobile-first, content-driven responsive patterns.


Mobile-First

Start with base styles for mobile, use min-width queries to layer complexity. Desktop-first (max-width) means mobile loads unnecessary styles first.

In Tailwind, unprefixed classes are mobile; sm:, md:, lg: add complexity upward.


Breakpoints: Content-Driven

Don't chase device sizes. Start narrow, stretch until the design breaks, add a breakpoint there. Three breakpoints usually suffice — Tailwind's sm (640), md (768), lg (1024) cover most cases.

Use clamp() for fluid scalar values (padding, type, gap) without breakpoints:

/* Fluid padding: 1rem at 320px → 3rem at 1280px */
.section { padding: clamp(1rem, 0.5rem + 2vw, 3rem); }

For grid layouts without breakpoints, use auto-fit + minmax instead — columns decide their own count based on available width. See spatial.md "Self-Adjusting Grid".


Detect Input Method, Not Screen Size

Screen size doesn't tell you input method — laptops have touchscreens, tablets have keyboards.

/* Fine pointer (mouse, trackpad) */
@media (pointer: fine) {
  .button { padding: 8px 16px; }
}

/* Coarse pointer (touch) */
@media (pointer: coarse) {
  .button { padding: 12px 20px; }
}

/* Only add hover effects if device supports hover */
@media (hover: hover) {
  .card:hover { transform: translateY(-2px); }
}

Critical: Don't rely on hover for functionality. Touch users can't hover.


Safe Areas

Modern phones have notches, rounded corners, home indicators. Enable viewport-fit and use env():

<meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover">
.footer {
  padding-bottom: max(1rem, env(safe-area-inset-bottom));
}

Layout Adaptation Patterns

Navigation

Three stages: hamburger + drawer on mobile → horizontal compact on tablet → full with labels on desktop. Nuxt UI's UHeader and UDashboardSidebar handle this — use their responsive props.

Tables

Transform to cards on mobile — Nuxt UI's UTable handles responsive display. For custom tables, use display: block with data-label attributes.

Progressive Disclosure

Use <details>/<summary> or Nuxt UI's UAccordion for content that can collapse on mobile.


Responsive Images

<img
  src="hero-800.jpg"
  srcset="hero-400.jpg 400w, hero-800.jpg 800w, hero-1200.jpg 1200w"
  sizes="(max-width: 768px) 100vw, 50vw"
  alt="Hero image"
>

Use <NuxtImg> with sizes prop — handles srcset generation automatically via @nuxt/image.

For art direction (different crops, not just sizes):

<picture>
  <source media="(min-width: 768px)" srcset="wide.jpg">
  <source media="(max-width: 767px)" srcset="tall.jpg">
  <img src="fallback.jpg" alt="...">
</picture>

Testing

DevTools device emulation misses actual touch interactions, real CPU/memory constraints, font rendering, and browser chrome. Test on at least one real iPhone and one real Android. Cheap Android phones reveal performance issues simulators hide.


Anti-Patterns

  • Desktop-first design
  • Device detection instead of feature detection
  • Separate mobile/desktop codebases
  • Ignoring tablet and landscape orientations
  • Assuming all mobile devices are powerful
  • Hover-dependent functionality without touch fallback

Source: SKILL.md on GitHub

skilld matched fixed text patterns in SKILL.md and file names. Patterns miss obfuscated code.

skilld run checks every file with the same patterns. It asks for approval before it loads a Skill with a behavior marked Needs approval.

1 warning3mo3 checks · Risk MEDIUM
  • Gen Agent Trust Hub3mo

    The skill utilizes dynamic context injection to probe the local environment and executes external CLI tools via npx, including an unverified package for CSS analysis.

  • Socket3mo

    No alerts

  • Snyk3mo

    Risk: LOW · No issues

Signed by skilld at 9c94eb4. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub last week.

Activeupdated last month
argument-hint
[component/page/area]
effort
max

README badge

README badge for harlan-zw/harlan-agent-kit/nuxt-frontend-design