{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "tag-template",
  "type": "registry:block",
  "title": "Tag Template",
  "description": "Tag-filtered article index. Used by `/tags/[slug]` routes on a blog to show \"all articles tagged #typescript\" etc. Shows a header (\"Tagged: #typescript\") then an ArticleListGrid of matching posts.",
  "author": "ofri-peretz <https://github.com/ofri-peretz>",
  "categories": [
    "blog",
    "template"
  ],
  "dependencies": [],
  "registryDependencies": [
    "https://ds.interlace.tools/r/theme.json",
    "https://ds.interlace.tools/r/cn.json",
    "https://ds.interlace.tools/r/container.json",
    "https://ds.interlace.tools/r/footer.json",
    "https://ds.interlace.tools/r/section-boundary.json",
    "https://ds.interlace.tools/r/skeleton.json",
    "https://ds.interlace.tools/r/stack.json",
    "https://ds.interlace.tools/r/tag.json",
    "https://ds.interlace.tools/r/topbar.json",
    "https://ds.interlace.tools/r/typography.json"
  ],
  "files": [
    {
      "path": "registry/interlace-ui/templates/tag-template.tsx",
      "target": "components/ui/templates/tag-template.tsx",
      "type": "registry:block",
      "content": "import * as React from 'react';\n\n// @interlace/tag-template v1.1.0 — Interlace design system.\n// Docs, props and live preview: https://ds.interlace.tools/c/tag-template\n// What changed since: https://ds.interlace.tools/c/tag-template#history\n// Generated banner — keep it, the upgrade diff reads this version.\n\n/**\n * @interlace/ui — TagTemplate\n *\n * Tag-filtered article index. Used by `/tags/[slug]` routes on a blog\n * to show \"all articles tagged #typescript\" etc. Shows a header\n * (\"Tagged: #typescript\") then an ArticleListGrid of matching posts.\n *\n * ## MIN_VIEWPORT — 320\n */\n\nimport { cn } from '@/lib/utils';\nimport { Container } from '@/components/ui/container';\nimport { SectionBoundary } from '@/components/ui/section-boundary';\nimport { Stack } from '@/components/ui/stack';\nimport { Tag } from '@/components/ui/tag';\nimport { Typography } from '@/components/ui/typography';\nimport { Topbar } from '@/components/ui/patterns/topbar';\nimport { Footer } from '@/components/ui/patterns/footer';\nimport { Skeleton } from '@/components/ui/skeleton';\n\nexport const MIN_VIEWPORT = 320 as const;\n\ninterface TagTemplateProps extends Omit<React.ComponentProps<'div'>, 'title'> {\n  topbar: React.ComponentProps<typeof Topbar>;\n  /** Tag name (rendered in the h1). */\n  tagName: string;\n  /** Optional URL for the tag chip in the header. */\n  tagHref?: string;\n  /** Optional one-line lead under the title. */\n  lead?: React.ReactNode;\n  /** Article grid — typically <ArticleListGrid posts={...} />. */\n  articles: React.ReactNode;\n  /** Optional sibling-tag cluster for navigation. */\n  relatedTags?: React.ReactNode;\n  footer?: React.ComponentProps<typeof Footer>;\n}\n\nfunction TagTemplate({\n  topbar,\n  tagName,\n  tagHref,\n  lead,\n  articles,\n  relatedTags,\n  footer,\n  className,\n  ...props\n}: TagTemplateProps) {\n  return (\n    <div\n      data-slot=\"tag-template\"\n      data-min-viewport={String(MIN_VIEWPORT)}\n      data-tag={tagName}\n      className={cn('bg-background text-foreground', className)}\n      {...props}\n    >\n      <Topbar {...topbar} />\n\n      <main>\n        <Container size=\"content\">\n          <Stack gap=\"xl\" className=\"py-xl\">\n            <SectionBoundary name=\"tag-header\" skeletonVariant=\"page-header\">\n              <Stack gap=\"sm\">\n                <Typography variant=\"h1\" as=\"h1\" className=\"text-balance\">\n                  Tagged:{' '}\n                  <Tag href={tagHref ?? '#'} tone=\"primary\">\n                    #{tagName}\n                  </Tag>\n                </Typography>\n                {lead ? (\n                  <Typography variant=\"long\" tone=\"muted\" className=\"max-w-prose\">\n                    {lead}\n                  </Typography>\n                ) : null}\n              </Stack>\n            </SectionBoundary>\n\n            <SectionBoundary\n              name=\"tag-articles\"\n              skeletonVariant=\"article-card\"\n            >\n              {articles}\n            </SectionBoundary>\n\n            {relatedTags ? (\n              <SectionBoundary\n                name=\"tag-related\"\n                skeletonVariant=\"text\"\n              >\n                <Stack gap=\"sm\">\n                  <Typography variant=\"h3\" as=\"h2\">\n                    Related tags\n                  </Typography>\n                  {relatedTags}\n                </Stack>\n              </SectionBoundary>\n            ) : null}\n          </Stack>\n        </Container>\n      </main>\n\n      {footer ? <Footer {...footer} /> : null}\n    </div>\n  );\n}\nTagTemplate.displayName = 'TagTemplate';\n\n/**\n * Page-level loading state — the full-page silhouette of\n * `<TagTemplate>`, not a single rect. Rendered by the consumer while\n * the whole route's data is in flight (`loading.tsx` in Next.js), or as\n * a `<SectionBoundary skeleton={…}>` override.\n *\n * Shapes mirror the real layout so the swap is CLS-neutral (R23). One\n * `role=\"status\"` region for the page; inner skeletons pass\n * `label={null}` so screen readers hear one announcement, not ten.\n */\nfunction TagTemplateSkeleton({\n  className,\n  ...props\n}: React.ComponentProps<'div'>) {\n  return (\n    <div\n      data-slot=\"tag-template-skeleton\"\n      data-min-viewport={String(MIN_VIEWPORT)}\n      role=\"status\"\n      aria-busy=\"true\"\n      aria-label=\"Loading tagged posts…\"\n      className={cn('bg-background text-foreground', className)}\n      {...props}\n    >\n      <Skeleton\n        variant=\"rect\"\n        className=\"h-14 w-full rounded-none\"\n        label={null}\n      />\n      <Container size=\"content\">\n        <Stack gap=\"xl\" className=\"py-xl\">\n          <Skeleton variant=\"page-header\" label={null} />\n          <Skeleton variant=\"article-card\" count={3} label={null} />\n          <Skeleton variant=\"tag\" count={2} label={null} />\n        </Stack>\n      </Container>\n    </div>\n  );\n}\nTagTemplateSkeleton.displayName = 'TagTemplateSkeleton';\nTagTemplate.Skeleton = TagTemplateSkeleton;\n\nexport { TagTemplate };\nexport type { TagTemplateProps };\n"
    }
  ],
  "meta": {
    "tier": "template",
    "client": false,
    "minViewport": 320,
    "loading": false,
    "version": "1.1.0",
    "since": "1.0.0"
  },
  "docs": "## @interlace/tag-template\n\nInstalled to `components/ui/templates/tag-template.tsx`.\n\n```tsx\nimport { /* … */ } from '@/components/ui/templates/tag-template';\n```\n\nProps, a11y contract, live preview and source: https://ds.interlace.tools/c/tag-template\n\nRequires the `@interlace/theme` CSS baseline (installed automatically as a registry dependency)."
}
