component lab
Components
Utility & chrome

CodeBlock

Code container with an optional filename header — so you know where the code lives — and a one-click copy button.

with filename header

The header tells you where the code lives; the button copies the block in one click.

vitest.config.ts
export default defineConfig({
  test: {
    pool: "forks",
    isolate: true,
  },
});
no filename / floating copy

Without a filename the copy button floats in the top-right corner of the block.

git worktree add ../fix-auth -b fix/auth