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.

referencescomponentsforms.md

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

Form Patterns

Nuxt UI form components with Zod validation.


Basic Form

<script setup lang="ts">
import { z } from 'zod'

const schema = z.object({
  email: z.string().email('Email address isn\'t valid — include an @ symbol'),
  name: z.string().min(2, 'Name must be at least 2 characters'),
  role: z.enum(['admin', 'user', 'viewer'])
})

type FormState = z.infer<typeof schema>

const state = reactive<FormState>({
  email: '',
  name: '',
  role: 'user'
})

const loading = ref(false)

async function onSubmit() {
  loading.value = true
  await api.createUser(state)
  loading.value = false
}
</script>

<template>
  <UForm :schema="schema" :state="state" class="space-y-4" @submit="onSubmit">
    <UFormField label="Name" name="name">
      <UInput v-model="state.name" placeholder="Jane Doe" />
    </UFormField>

    <UFormField label="Email" name="email">
      <UInput v-model="state.email" type="email" placeholder="jane@example.com" />
    </UFormField>

    <UFormField label="Role" name="role">
      <USelect v-model="state.role" :items="['admin', 'user', 'viewer']" />
    </UFormField>

    <UButton type="submit" :loading="loading">
      Create User
    </UButton>
  </UForm>
</template>

Input Groups

Group related fields visually:

<div class="grid grid-cols-2 gap-4">
  <UFormField label="First Name" name="firstName">
    <UInput v-model="state.firstName" />
  </UFormField>
  <UFormField label="Last Name" name="lastName">
    <UInput v-model="state.lastName" />
  </UFormField>
</div>

Toggle / Switch Fields

<UFormField label="Notifications" name="notifications">
  <USwitch v-model="state.notifications" />
</UFormField>

<UFormField label="Features" name="features">
  <div class="space-y-2">
    <UCheckbox v-model="state.darkMode" label="Dark mode" />
    <UCheckbox v-model="state.analytics" label="Analytics" />
  </div>
</UFormField>

Textarea

<UFormField label="Bio" name="bio">
  <UTextarea v-model="state.bio" :rows="4" placeholder="Tell us about yourself..." />
</UFormField>

Validation UX

  • Placeholders aren't labels — they disappear on input. Always use UFormField with label prop
  • Validate on blur, not every keystroke (exception: password strength)
  • Error messages need three parts: what happened, why, how to fix — "Too short" → "Name must be at least 2 characters"
  • Never blame the user — "Invalid email" → "Email address isn't valid"
  • Mark required fields with label suffix, not asterisk
  • Success state: brief toast, not inline message
  • Disable submit button when loading is true
  • Use :loading prop on submit button for spinner
  • Use v-model.nullable (not nullify) for empty → null conversion
  • Nested forms require nested prop and name prop on inner UForm

Component Mapping

Need Component
Text input UInput
Email/password UInput type="email"
Long text UTextarea
Number UInputNumber
Single select USelect
Searchable select USelectMenu
On/off toggle USwitch
Multi-option UCheckbox in group / UCheckboxGroup
File upload UFileUpload
Date picker UInputDate
Time picker UInputTime
Tags/chips UInputTags
PIN/OTP UPinInput
Color UColorPicker

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