X Enterprises
nuxt-x-affiliate

Taxonomy Archive

Category/tag/topic archive grid with cover images, descriptions, counts, and list/grid layouts. Auto-emits CollectionPage schema.

Taxonomy Archive

The XAFTaxonomyArchive component renders a category, tag, or topic archive page. Use it as the page-level component for /categories, /tags, /topics/[name], or similar taxonomy landing pages. It pairs with <XAFCategoryIndex> (which renders inline category links) — use this component when you want a full archive page.

Components

<XAFTaxonomyArchive />

<XAFTaxonomyArchive
  title="All Categories"
  intro="Browse every product category we cover."
  :items="categories"
  :columns="3"
  layout="grid"
/>

Props

PropTypeDefaultDescription
titlestringrequiredPage title (e.g. "All Categories")
itemsTaxonomyArchiveItem[]requiredEach item has label, href, optional count, description, and image
taxonomy'category' | 'tag' | 'topic' | 'custom''category'Taxonomy kind — used in the auto-emitted CollectionPage schema
columns2 | 3 | 43Number of grid columns at full width
layout'grid' | 'list''grid''grid' renders cards; 'list' renders denser rows
showEmptybooleantrueShow an empty state when items is empty
emptyMessagestring'Nothing here yet.'Empty state message
introstringIntro paragraph shown above the grid

Item shape

interface TaxonomyArchiveItem {
  label: string         // Display label (e.g. "Coffee Makers")
  href: string          // Link target (e.g. "/categories/coffee-makers")
  count?: number        // Badge count (e.g. 42)
  description?: string  // Short description shown below the label
  image?: string        // Optional cover image URL
}

Layouts

Grid (default):

<XAFTaxonomyArchive title="Categories" :items="cats" layout="grid" :columns="3" />

Cards with optional cover image, label, count badge, and 2-line description.

List:

<XAFTaxonomyArchive title="Tags" :items="tags" layout="list" />

Denser row layout — better for long taxonomies (50+ entries) and mobile.

Auto-emitted schema

<XAFTaxonomyArchive> calls useSiteMeta() internally, which emits a CollectionPage-flavored schema.org payload via useHead(). Search engines will see the page title and intro as the page description.

Tips

  • For a category landing page that shows recent posts in each category, use <XAFCategoryIndex> instead — it renders the same kind of grid but pulls recent items automatically.
  • For paginated archives (e.g. 50 categories), pair with <XAFPagination> to break the grid into pages.
  • The empty state is intentionally a plain dashed-border message so it's visible without being intrusive. Override via emptyMessage.

AI Context

component: XAFTaxonomyArchive
package: "@xenterprises/nuxt-x-affiliate"
use-when: Full-page taxonomy archive (categories, tags, topics) with grid or list layout
Copyright © 2026