Index of every page on this site: llms.txt
All skills
nuxt avatar

/nuxt-ui

@bcc09c0 official
by nuxtnuxt/ui7k stars
1,152
Run it yourself

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/nuxt/ui/nuxt-ui

Nothing lands on disk. Nothing to clean up.

Fork this Skill

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

referencesrecipesauth.md

≈1.3k 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

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.

No alerts10d5 checks · Risk SAFE
  • Gen Agent Trust Hub10d

    The skill provides comprehensive documentation and development patterns for the Nuxt UI v4 component library. It includes configurations for official MCP servers and code recipes for common UI tasks using standard, well-known web technologies.

  • Socket10d

    No alerts

  • Snyk10d

    Risk: LOW · No issues

  • Runlayer8mo

    9 files scanned · No issues

  • ZeroLeaks6mo

    Score: 93/100 · 2 sections analyzed

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

Last checked against GitHub 5 days ago.

Activeupdated 3 months ago
  • Nuxt
  • Vue
  • tailwindcss
  • components
  • ui
  • forms
  • theming
  • accessibility

README badge

README badge for nuxt/ui

Provides 125+ accessible Vue components built on Tailwind CSS and Reka UI, with semantic color tokens and theming support. Use for building interfaces in Nuxt, Vue, Laravel Inertia, or AdonisJS — forms, dashboards, documentation sites, and chat UIs.

Generated from the current SKILL.md.

Does this work with Vue outside of Nuxt?
Yes. @nuxt/ui v4 works with Vue (Vite), Laravel (Vite + Inertia), and AdonisJS (Vite + Inertia). Installation differs slightly but uses the same component library.
How do I find out what props and slots a component accepts?
Use the Nuxt UI MCP server with the `get_component` tool for full documentation, or `get_component_metadata` for a lightweight props/slots/events reference. The skill also points you to generated theme files in `.nuxt/ui/<component>.ts`.
Can I customize the theme to match my brand?
Yes. The skill includes a design-system reference that covers semantic colors, theming, and brand customization. Components use semantic color names like `text-default` and `bg-elevated` rather than raw Tailwind colors.
What if I need help building a specific layout like a dashboard or docs site?
The skill includes full layout references for dashboards, docs sites, landing pages, chat interfaces, and editors. Load the relevant reference file before coding to follow the established patterns.
Does this include form validation?
Yes. The forms reference covers validation, field layout, error handling, and Standard Schema integration for both client and server-side validation.

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