All skills
onmax avatar

/nuxt-ui

@de09c7b official
by Maxonmax/nuxt-skills715 stars
38

Build UIs with @nuxt/ui v4 — 125+ accessible Vue components with Tailwind CSS theming. Use when creating interfaces, customizing themes to match a brand, building forms, or composing layouts like dashboards, docs sites, and chat interfaces.

Use this Skill: https://skilld.dev/gh/onmax/nuxt-skills/nuxt-ui

This session only. Nothing lands on disk.

referencesrecipesauth.md

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

Auth Forms

UAuthForm (recommended)

UAuthForm provides a complete auth form with fields, providers, validation, and submit — no manual UForm + UFormField wiring needed. Wrap it in UPageCard for a polished look.

<script setup lang="ts">
import * as z from 'zod'
import type { FormSubmitEvent, AuthFormField } from '@nuxt/ui'

const fields: AuthFormField[] = [{
  name: 'email',
  type: 'email',
  label: 'Email',
  placeholder: 'Enter your email',
  required: true
}, {
  name: 'password',
  label: 'Password',
  type: 'password',
  placeholder: 'Enter your password',
  required: true
}, {
  name: 'remember',
  label: 'Remember me',
  type: 'checkbox'
}]

const providers = [{
  label: 'Google',
  icon: 'i-simple-icons-google',
  onClick: () => navigateTo('/auth/google', { external: true })
}, {
  label: 'GitHub',
  icon: 'i-simple-icons-github',
  onClick: () => navigateTo('/auth/github', { external: true })
}]

const schema = z.object({
  email: z.email('Invalid email'),
  password: z.string('Password is required').min(8, 'Must be at least 8 characters')
})

type Schema = z.output<typeof schema>

function onSubmit(payload: FormSubmitEvent<Schema>) {
  // payload.data contains validated fields
}
</script>

<template>
  <div class="flex min-h-dvh items-center justify-center">
    <UPageCard class="w-full max-w-md">
      <UAuthForm
        :schema="schema"
        :fields="fields"
        :providers="providers"
        title="Welcome back!"
        description="Sign in to your account."
        icon="i-lucide-lock"
        @submit="onSubmit"
      >
        <template #password-hint>
          <ULink to="/forgot-password" class="text-primary font-medium">Forgot password?</ULink>
        </template>
        <template #footer>
          Don't have an account? <ULink to="/signup" class="text-primary font-medium">Sign up</ULink>.
        </template>
      </UAuthForm>
    </UPageCard>
  </div>
</template>

UAuthForm key props

Prop Purpose
title, description, icon Header content
fields AuthFormField[] — each has name, type, label, placeholder, required
providers ButtonProps[] — social login buttons shown above/below the form
schema Zod/Valibot schema for validation
submit Customize submit button: { label: 'Sign in', block: true }
separator Text between providers and fields (default: 'or')

UAuthForm key slots

Slot Purpose
#description Override description (e.g., add sign-up link)
#password-hint "Forgot password?" link on password field
#validation Custom error display (e.g., UAlert)
#footer Terms of service, sign-up link
#<field>-field Override a specific field's rendering

Custom auth layout

For layouts where UAuthForm is too opinionated, use UCard + UForm + UFormField directly.

<script setup lang="ts">
import * as z from 'zod'
import type { FormSubmitEvent } from '@nuxt/ui'

const schema = z.object({
  email: z.email('Invalid email'),
  password: z.string().min(1, 'Password is required')
})

type Schema = z.output<typeof schema>
const state = reactive<Partial<Schema>>({ email: '', password: '' })

async function onSubmit(event: FormSubmitEvent<Schema>) {
  // event.data contains validated fields
}
</script>

<template>
  <div class="flex min-h-dvh items-center justify-center">
    <UCard class="w-full max-w-sm">
      <template #header>
        <div class="text-center">
          <h1 class="text-xl font-semibold text-default">Welcome back</h1>
          <p class="mt-1 text-sm text-muted">Sign in to your account</p>
        </div>
      </template>

      <UForm :schema="schema" :state="state" class="space-y-4" @submit="onSubmit">
        <UFormField name="email" label="Email">
          <UInput v-model="state.email" type="email" placeholder="you@example.com" />
        </UFormField>

        <UFormField name="password" label="Password">
          <template #hint>
            <NuxtLink to="/forgot-password" class="text-sm text-primary">Forgot password?</NuxtLink>
          </template>
          <UInput v-model="state.password" type="password" />
        </UFormField>

        <UButton type="submit" label="Sign in" block />
      </UForm>

      <template #footer>
        <p class="text-center text-sm text-muted">
          Don't have an account?
          <NuxtLink to="/signup" class="text-primary font-medium">Sign up</NuxtLink>
        </p>
      </template>
    </UCard>
  </div>
</template>

Tips

  • Prefer UAuthForm with UPageCard for standard auth pages — handles layout, providers, validation, and submit
  • Use import * as z from 'zod' and z.email() (Zod 4 syntax)
  • Type the submit handler: function onSubmit(event: FormSubmitEvent<Schema>) — access validated data via event.data
  • Center auth forms with flex min-h-dvh items-center justify-center
  • Place "Forgot password?" link as #password-hint slot on UAuthForm, or #hint slot on UFormField
  • Social login buttons: use providers prop on UAuthForm, or add manually with <USeparator label="or" />

Source: SKILL.md on GitHub

No alerts12d5 checks · Risk SAFE
  • Gen Agent Trust Hub12d

    The skill provides comprehensive documentation and implementation guidance for the Nuxt UI v4 component library. It includes a maintenance script for synchronizing documentation with the official repository. No malicious patterns or security risks were identified.

  • Socket12d

    No alerts

  • Snyk12d

    Risk: LOW · No issues

  • Runlayer7mo

    129 files scanned · No issues

  • ZeroLeaks5mo

    Score: 93/100 · 2 sections analyzed

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

Last checked against GitHub 2 days ago.

Activeupdated last week

README badge

README badge for onmax/nuxt-skills/nuxt-ui

Builds styled UI for Nuxt 4+ using @nuxt/ui v4 components with Tailwind CSS and Tailwind Variants. Covers forms with validation, data tables, modals, and theme customization through semantic colors and CSS variables.

Generated from the current SKILL.md.

Does this skill cover Reka UI headless primitives?
No. This skill focuses on @nuxt/ui v4 components (styled, opinionated). For Reka UI primitives, accessibility patterns, and asChild behavior, use the reka-ui skill instead.
What form validation libraries does this support?
Zod and Valibot. The skill includes guidance on useFormField and form component integration with both libraries.
Do I need UApp wrapper?
Yes, UApp is required to use Toast, Tooltip, and overlay components like Modal and Slideover.
Can I customize colors and theme?
Yes. The skill covers semantic colors, CSS variables, app.config.ts setup, and Tailwind Variants for type-safe styling.
What Nuxt and Vue versions does this require?
Vue 3 and Nuxt 4+. The current stable version is v4.4.0 (January 2026).

Generated from the current SKILL.md. These answers refresh after source changes.