Show code with line numbers, highlighted lines, file tabs and copy.
Import it and pass your content. The props that matter most are listed next.
import { CodeBlock } from "@/components/ui/notchset/code-block";
const code = [
'import { Relay } from "@relay/sdk";',
"",
"const relay = new Relay({ apiKey: process.env.RELAY_KEY });",
"",
"export async function run(prompt: string) {",
' const run = await relay.agents.run("planner", {',
" input: prompt,",
' tools: ["search_docs", "run_sql"],',
" });",
" return run.output;",
"}",
].join("\n");
export function QuickstartCode() {
return <CodeBlock files={[{ lang: "ts", label: "TS", filename: "run.ts", code, highlight: "6-9" }]} />;
}files–
{ lang, label, filename, code, highlight? }[]One or more; several get a language switch.
defaultLang–
stringThe file shown first.
highlight–
"6-11"Lines marked at first, per file.
wrap–
booleanWrap instead of scrolling sideways.
onCopy–
(code) => voidAfter copying.
CodeBlockdata-slot="code-block"
The block.
tokenizedata-slot="—"
The monochrome tokenizer.
components/ui/notchset/code-block.tsx
pnpm dlx shadcn@latest add https://notchset.dev/r/code-block.jsonpnpm dlx shadcn@latest add https://notchset.dev/r/radix-nova/code-block.jsonFree, no account or key. Use the command for your project's primitives: a radix-*, new-york or default style in components.json is Radix, a base-* style is Base UI. With the @notchset registry added, @notchset/<name> picks for you.
The CLI adds the styles to the CSS file named in components.json (tailwind.css). Check that it points at your global stylesheet, that the project uses Tailwind CSS v4, and that the file is imported in your root layout. Installed by hand: paste styles.css into that file.
Give your coding assistant the Markdown guide instead of screenshots.
https://notchset.dev/api/mcp (setup)v1.0.0 · 2026-10-02
First release