Skip to content

secondsky/claude-skills / plugins/nuxt-ui-v4/skills/nuxt-ui-v4

nuxt-ui-v4

Verified

Nuxt UI v4 component library for building Nuxt v4 applications. 125+ accessible components with Tailwind v4, Reka UI, dark mode, theming. Use for dashboards, forms, overlays, editors, page layouts, pricing pages, or encountering component, theming, or TypeScript errors.

FileKindSize
SKILL.mdskill md13.0 KB
references/COMMON_ERRORS_DETAILED.mdmarkdown24.7 KB
references/accessibility-patterns.mdmarkdown822 B
references/ai-sdk-v5-integration.mdmarkdown6.4 KB
references/auth-form.mdmarkdown6.4 KB
references/chat-components.mdmarkdown13.2 KB
references/chat-reasoning.mdmarkdown3.0 KB
references/chat-shimmer.mdmarkdown1.6 KB
references/chat-tool.mdmarkdown3.6 KB
references/command-palette-setup.mdmarkdown1.1 KB
references/common-components.mdmarkdown1.2 KB
references/component-theming-guide.mdmarkdown13.2 KB
references/composables-guide.mdmarkdown908 B
references/content-components.mdmarkdown7.3 KB
references/css-variables-reference.mdmarkdown14.9 KB
references/dark-mode-guide.mdmarkdown10.9 KB
references/dashboard-components.mdmarkdown8.1 KB
references/data-display-components.mdmarkdown11.7 KB
references/design-system-guide.mdmarkdown16.1 KB
references/editor-components.mdmarkdown7.9 KB
references/feedback-components-reference.mdmarkdown11.4 KB
references/form-advanced-patterns.mdmarkdown1.7 KB
references/form-components-reference.mdmarkdown14.0 KB
references/form-validation-patterns.mdmarkdown6.4 KB
references/i18n-integration.mdmarkdown12.8 KB
references/icon-system-guide.mdmarkdown14.5 KB
references/layout-components-reference.mdmarkdown9.5 KB
references/loading-feedback-patterns.mdmarkdown1.0 KB
references/navigation-components-reference.mdmarkdown8.8 KB
references/nuxt-content-integration.mdmarkdown15.7 KB
references/nuxt-v4-features.mdmarkdown8.0 KB
references/overlay-decision-guide.mdmarkdown1.3 KB
references/page-layout-components.mdmarkdown8.4 KB
references/performance-optimization.mdmarkdown12.8 KB
references/pricing-components.mdmarkdown7.7 KB
references/responsive-patterns.mdmarkdown795 B
references/semantic-color-system.mdmarkdown1.3 KB
references/tailwind-prefix-guide.mdmarkdown7.6 KB
references/typescript-setup.mdmarkdown10.8 KB
scripts/check-versions.shexecutablescript1.3 KB
templates/app.config.tsscript2.5 KB
templates/app.vueother1.1 KB
templates/components/ui-avatar-badge.vueother7.7 KB
templates/components/ui-card-layouts.vueother5.9 KB
templates/components/ui-carousel-gallery.vueother1.4 KB
templates/components/ui-chat-full.vueother3.4 KB
templates/components/ui-chat-interface.vueother8.8 KB
templates/components/ui-command-palette.vueother1.8 KB
templates/components/ui-content-prose.vueother7.2 KB
templates/components/ui-dark-mode-toggle.vueother7.4 KB
templates/components/ui-data-table.vueother7.1 KB
templates/components/ui-drawer-mobile.vueother5.2 KB
templates/components/ui-dropdown-menu.vueother6.3 KB
templates/components/ui-empty-state.vueother5.2 KB
templates/components/ui-feedback-states.vueother6.2 KB
templates/components/ui-form-example.vueother4.5 KB
templates/components/ui-input-date.vueother5.2 KB
templates/components/ui-input-time.vueother5.8 KB
templates/components/ui-modal-dialog.vueother8.0 KB
templates/components/ui-navigation-tabs.vueother7.2 KB
templates/components/ui-popover-tooltip.vueother2.6 KB
templates/components/ui-toast-notifications.vueother8.9 KB
templates/composables/useAIChat.tsscript2.9 KB
templates/composables/useI18nForm.tsscript9.6 KB
templates/composables/useNuxtUITheme.tsscript2.4 KB
templates/layouts/dashboard.vueother3.7 KB
templates/nuxt.config.tsscript1.3 KB
templates/pages/landing.vueother5.9 KB

templates/components/ui-data-table.vue

View on GitHub
<template>
  <div class="p-6">
    <UCard>
      <template #header>
        <div class="flex items-center justify-between">
          <div>
            <h2 class="text-2xl font-bold">Data Table Example</h2>
            <p class="text-dimmed mt-1">Demonstrates sorting, pagination, selection, and actions</p>
          </div>
          <UButton @click="addNew">Add New</UButton>
        </div>
      </template>

      <!-- Search and Filters -->
      <div class="flex gap-4 mb-4">
        <UInput
          v-model="searchQuery"
          placeholder="Search..."
          class="flex-1"
        >
          <template #leading>
            <UIcon name="i-heroicons-magnifying-glass" />
          </template>
        </UInput>

        <USelect
          v-model="statusFilter"
          :options="statusOptions"
          placeholder="Filter by status"
        />
      </div>

      <!-- Table -->
      <UTable
        v-model="selectedRows"
        v-model:sort="sort"
        :rows="paginatedRows"
        :columns="columns"
        :loading="loading"
        @select="onSelect"
      >
        <!-- Name column with avatar -->
        <template #name-data="{ row }">
          <div class="flex items-center gap-3">
            <UAvatar :src="row.avatar" :alt="row.name" size="sm" />
            <span class="font-medium">{{ row.name }}</span>
          </div>
        </template>

        <!-- Status column with badge -->
        <template #status-data="{ row }">
          <UBadge
            :color="getStatusColor(row.status)"
            variant="subtle"
          >
            {{ row.status }}
          </UBadge>
        </template>

        <!-- Actions column with dropdown -->
        <template #actions-data="{ row }">
          <UDropdownMenu>
            <UButton
              variant="ghost"
              size="sm"
              icon="i-heroicons-ellipsis-horizontal"
            />
            <template #content>
              <UDropdownMenuItem @click="editRow(row)">
                <UIcon name="i-heroicons-pencil" class="mr-2" />
                Edit
              </UDropdownMenuItem>
              <UDropdownMenuItem @click="viewRow(row)">
                <UIcon name="i-heroicons-eye" class="mr-2" />
                View
              </UDropdownMenuItem>
              <UDropdownMenuSeparator />
              <UDropdownMenuItem @click="deleteRow(row)" class="text-error">
                <UIcon name="i-heroicons-trash" class="mr-2" />
                Delete
              </UDropdownMenuItem>
            </template>
          </UDropdownMenu>
        </template>
      </UTable>

      <!-- Pagination -->
      <template #footer>
        <div class="flex items-center justify-between">
          <span class="text-sm text-dimmed">
            Showing {{ startRow }} to {{ endRow }} of {{ filteredRows.length }} results
          </span>

          <UPagination
            v-model="page"
            :page-count="pageCount"
            :total="filteredRows.length"
          />
        </div>
      </template>
    </UCard>
  </div>
</template>

<script setup lang="ts">
// Table columns
const columns = [
  { key: 'name', label: 'Name', sortable: true },
  { key: 'email', label: 'Email', sortable: true },
  { key: 'role', label: 'Role', sortable: true },
  { key: 'status', label: 'Status', sortable: true },
  { key: 'actions', label: 'Actions' }
]

// Sample data
const allRows = ref([
  {
    id: 1,
    name: 'John Doe',
    email: 'john@example.com',
    role: 'Developer',
    status: 'active',
    avatar: 'https://i.pravatar.cc/150?img=1'
  },
  {
    id: 2,
    name: 'Jane Smith',
    email: 'jane@example.com',
    role: 'Designer',
    status: 'active',
    avatar: 'https://i.pravatar.cc/150?img=2'
  },
  {
    id: 3,
    name: 'Bob Johnson',
    email: 'bob@example.com',
    role: 'Manager',
    status: 'inactive',
    avatar: 'https://i.pravatar.cc/150?img=3'
  },
  {
    id: 4,
    name: 'Alice Williams',
    email: 'alice@example.com',
    role: 'Developer',
    status: 'active',
    avatar: 'https://i.pravatar.cc/150?img=4'
  },
  {
    id: 5,
    name: 'Charlie Brown',
    email: 'charlie@example.com',
    role: 'Designer',
    status: 'pending',
    avatar: 'https://i.pravatar.cc/150?img=5'
  }
])

// State
const loading = ref(false)
const searchQuery = ref('')
const statusFilter = ref('')
const selectedRows = ref([])
const sort = ref({ column: 'name', direction: 'asc' as const })
const page = ref(1)
const pageCount = 10

// Status options for filter
const statusOptions = [
  { label: 'All', value: '' },
  { label: 'Active', value: 'active' },
  { label: 'Inactive', value: 'inactive' },
  { label: 'Pending', value: 'pending' }
]

// Computed: Filtered rows
const filteredRows = computed(() => {
  let filtered = allRows.value

  // Apply search filter
  if (searchQuery.value) {
    const query = searchQuery.value.toLowerCase()
    filtered = filtered.filter(row =>
      row.name.toLowerCase().includes(query) ||
      row.email.toLowerCase().includes(query) ||
      row.role.toLowerCase().includes(query)
    )
  }

  // Apply status filter
  if (statusFilter.value) {
    filtered = filtered.filter(row => row.status === statusFilter.value)
  }

  // Apply sorting
  if (sort.value.column) {
    filtered = [...filtered].sort((a, b) => {
      const aVal = a[sort.value.column as keyof typeof a]
      const bVal = b[sort.value.column as keyof typeof b]

      if (sort.value.direction === 'asc') {
        return aVal < bVal ? -1 : 1
      } else {
        return aVal > bVal ? -1 : 1
      }
    })
  }

  return filtered
})

// Computed: Paginated rows
const paginatedRows = computed(() => {
  const start = (page.value - 1) * pageCount
  const end = start + pageCount
  return filteredRows.value.slice(start, end)
})

// Computed: Pagination info
const startRow = computed(() => (page.value - 1) * pageCount + 1)
const endRow = computed(() => Math.min(page.value * pageCount, filteredRows.value.length))

// Get status color
function getStatusColor(status: string) {
  const colors: Record<string, string> = {
    active: 'success',
    inactive: 'error',
    pending: 'warning'
  }
  return colors[status] || 'neutral'
}

// Actions
function onSelect(rows: any[]) {
  console.log('Selected rows:', rows)
}

function addNew() {
  console.log('Add new row')
  // Open modal or navigate to create page
}

function editRow(row: any) {
  console.log('Edit row:', row)
  // Open edit modal or navigate to edit page
}

function viewRow(row: any) {
  console.log('View row:', row)
  // Navigate to detail page
}

async function deleteRow(row: any) {
  // Confirm deletion
  const confirmed = confirm(`Delete ${row.name}?`)
  if (!confirmed) return

  loading.value = true
  try {
    // Simulate API call
    await new Promise(resolve => setTimeout(resolve, 500))

    // Remove from list
    allRows.value = allRows.value.filter(r => r.id !== row.id)

    // Show success toast
    const { add: addToast } = useToast()
    addToast({
      title: 'Deleted',
      description: `${row.name} has been deleted`,
      color: 'success'
    })
  } catch (error) {
    console.error('Delete error:', error)
  } finally {
    loading.value = false
  }
}
</script>
brainstormingobra/superpowersYou MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or planning anything new, in software or out of it (a talk, a business, a renovation).Stars: 322kUpdated Claude CodeCodexVerifiedInstall
brand-guidelinesanthropics/skillsApplies Anthropic's official brand colors and typography to any sort of artifact that may benefit from having Anthropic's look-and-feel. Use it when brand colors or style guidelines, visual formatting, or company design standards apply.Stars: 198kUpdated Claude CodeCodexVerifiedInstall
frontend-designanthropics/skillsGuidance for distinctive, intentional visual design when building new UI or reshaping an existing one. Helps with aesthetic direction, typography, and making choices that don't read as templated defaults.Stars: 198kUpdated Claude CodeCodexVerifiedInstall
mcp-builderanthropics/skillsGuide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when building MCP servers to integrate external APIs or services, whether in Python (FastMCP) or Node/TypeScript (MCP SDK).Stars: 198kUpdated Claude CodeCodexVerifiedInstall