Author Template
interlace-ui/author-templateFreeBlock
Author profile page — bio header + their articles grid. Used by `/authors/[slug]` routes on a blog. The bio header is a multi-part card (avatar + name + role + bio + social links); the grid uses ArticleListGrid for the article list.
Install it
npx shadcn@latest add https://ds.interlace.tools/r/author-template.jsonSource
1import * as React from 'react';23// @interlace/author-template v1.1.0 — Interlace design system.4// Docs, props and live preview: https://ds.interlace.tools/c/author-template5// What changed since: https://ds.interlace.tools/c/author-template#history6// Generated banner — keep it, the upgrade diff reads this version.78/**9 * @interlace/ui — AuthorTemplate10 *11 * Author profile page — bio header + their articles grid. Used by12 * `/authors/[slug]` routes on a blog. The bio header is a multi-part13 * card (avatar + name + role + bio + social links); the grid uses14 * ArticleListGrid for the article list.15 *16 * ## MIN_VIEWPORT — 32017 */1819import { cn } from '@/lib/utils';20import { Container } from '@/components/ui/container';21import { SectionBoundary } from '@/components/ui/section-boundary';22import { Stack } from '@/components/ui/stack';23import { Topbar } from '@/components/ui/patterns/topbar';24import { Footer } from '@/components/ui/patterns/footer';25import { Skeleton } from '@/components/ui/skeleton';2627export const MIN_VIEWPORT = 320 as const;2829interface AuthorTemplateProps extends React.ComponentProps<'div'> {30 topbar: React.ComponentProps<typeof Topbar>;31 /**32 * Author bio header — consumer-supplied. Typically renders33 * <AuthorByline /> + a paragraph + social links.34 */35 bio: React.ReactNode;36 /** Article grid — typically <ArticleListGrid title="By Ofri" posts={...} />. */37 articles: React.ReactNode;38 footer?: React.ComponentProps<typeof Footer>;39}4041function AuthorTemplate({42 topbar,43 bio,44 articles,45 footer,46 className,47 ...props48}: AuthorTemplateProps) {49 return (50 <div51 data-slot="author-template"52 data-min-viewport={String(MIN_VIEWPORT)}53 className={cn('bg-background text-foreground', className)}54 {...props}55 >56 <Topbar {...topbar} />5758 <main>59 <Container size="prose">60 <Stack gap="xl" className="py-xl">61 <SectionBoundary name="author-bio" skeletonVariant="author-byline">62 {bio}63 </SectionBoundary>6465 <SectionBoundary66 name="author-articles"67 skeletonVariant="article-card"68 >69 {articles}70 </SectionBoundary>71 </Stack>72 </Container>73 </main>7475 {footer ? <Footer {...footer} /> : null}76 </div>77 );78}79AuthorTemplate.displayName = 'AuthorTemplate';8081/**82 * Page-level loading state — the full-page silhouette of83// … truncated
More from interlace-ui
All 140 items| Component | Registry | Kind | Access | Installs | Command |
|---|---|---|---|---|---|
| Article Templatearticle-template | interlace-ui | Blocks | Free | no deps | |
| Auth Templateauth-template | interlace-ui | Blocks | Free | no deps | |
| Blog Home Templateblog-home-template | interlace-ui | Blocks | Free | no deps | |
| Dashboard Templatedashboard-template | interlace-ui | Blocks | Free | no deps | |
| Docs Page Templatedocs-page-template | interlace-ui | Blocks | Free | no deps | |
| Error Templateerror-template | interlace-ui | Blocks | Free | no deps | |
| Landing Templatelanding-template | interlace-ui | Blocks | Free | no deps | |
| Registry Item Templateregistry-item-template | interlace-ui | Blocks | Free | no deps |
