Code blocks

Shiki with the VS Code Dark+ theme, highlighted on the server. Copy always copies the raw file contents.

Single snippet

typescript
export function greet(name: string): string {
  const time = new Date().getHours();
  const part = time < 12 ? "morning" : time < 18 ? "afternoon" : "evening";
  return "Good " + part + ", " + name + "!";
}

Single file with a path

typescriptsrc/lib/greet.ts
export function greet(name: string): string {
  const time = new Date().getHours();
  const part = time < 12 ? "morning" : time < 18 ? "afternoon" : "evening";
  return "Good " + part + ", " + name + "!";
}

Multiple files (tabs on mobile, explorer on desktop)

tsxsrc/components/counter/Counter.tsx
"use client";

import { useState } from "react";
import styles from "./Counter.module.css";

export function Counter({ start = 0 }: { start?: number }) {
  const [count, setCount] = useState(start);

  return (
    <button className={styles.button} onClick={() => setCount((c) => c + 1)}>
      Clicked {count} {count === 1 ? "time" : "times"}
    </button>
  );
}

Long line (try wrap)

bash
npx create-next-app@latest my-app --typescript --tailwind --eslint --app --src-dir --import-alias "@/*" --use-npm --turbopack --skip-install
  • Tabs

    PageTabs: several views of one topic on a page, linkable by URL hash and fully readable by crawlers.

  • Component library

    Every typography and shadcn component, rendered in the real theme.

  • Layouts with route groups

    The plan to give each kind of page its own layout with Next.js route groups: (site), (notes) with a left notes aside, (bare), and (artifacts) for self-contained HTML files.

  • Highlight

    The Highlight text component: a faint blue tint with square corners, whose side padding repeats on every line it wraps across.