labsUI
Accent color

Blog

A blog with a post list, long posts with highlighted code and a list of sections, and an about page.

Open demo
A reference build: the checked run's code, polished by hand. An agent's result will differ.

Prompt

Using labsUI, build a security and engineering publication, all text in English. The home page has two speeds: a narrow "in brief" column of short dated news items (one or two lines each, a severity badge where it fits) next to the long reads, which are a typographic list (date, title, one-line summary), not a grid of cards. Long reads use a serif display font from `next/font` and a narrow reading column: reading time, a list of sections that follows the scroll on wide screens, code samples, a callout for "what to do now", footnotes in the margin on wide screens, a "part 2 of 3" series box and next/previous links at the end. An about page introduces the three authors. Warm off-white background, light first, sample data. Pick one accent preset that fits, not the default blue. Avoid a small label above every heading, a centered hero with two equal buttons, three equal feature cards and round numbers like 10,000+.

Checked on labsUI 0.2.3 with Claude Sonnet, November 9, 2026: a fresh Next.js 16 app, the agent using only the labsUI MCP server. Its build passed and axe found no violations from labsUI.

The raw run

The checked run's own result, before any polish: what the prompt alone got.

The blog the checked run built
What that run built, unedited. Your agent's result will differ in the details.

Components it uses

The agent adds these itself. To start by hand, after npx @kznlabs/labsui init:

npx @kznlabs/labsui add alert avatar badge button code dialog drawer navigation-menu pager prose site-footer site-header table-of-contents tabs theme-toggle tooltip

What the result needs

Mark the current page in the header

SiteHeader takes current; read it with usePathname() in a small client component in the root layout. Its links, like every block's, route on the client once the root layout wraps the app in <LinkProvider component={Link}>. On a dynamic route, list every slug in generateStaticParams and set dynamicParams = false: with Cache Components, Next 16.4 otherwise reports usePathname() outside <Suspense> for the unknown-slug shell, even with a boundary around the header.

tsx
"use client";import Link from "next/link";import { usePathname } from "next/navigation";import { SiteHeader } from "@/components/blocks/site-header";export function Header() {  const pathname = usePathname();  return (    <SiteHeader      brand={<Link href="/">Field Notes</Link>}      nav={[        { label: "Posts", href: "/" },        { label: "About", href: "/about" },      ]}      current={pathname.startsWith("/posts") ? "/" : pathname}    />  );}// app/posts/[slug]/page.tsxexport const dynamicParams = false;

Highlight code on the server

Call highlightCode() from a "use cache" function and pass the result to Code as tokens, so the browser never loads Shiki. Under Cache Components a plain call fails the prerender.

tsx
import { Code } from "@/components/ui/code";import { highlightCode } from "@/lib/highlight";async function highlight(code: string, language: string) {  "use cache";  return highlightCode(code, language);}export async function CodeBlock({ code, language }: { code: string; language: string }) {  const tokens = await highlight(code, language);  return <Code code={code} language={language} tokens={tokens ?? undefined} />;}