Studiov0.6.0

Code

Tier 1shadcn
Typography

Inline code and multi-line code block components with syntax styling.

Live Preview

Use import { Button } from "@regen/ui" to import.

Ctrl

Code

import { Code } from "@regen/ui";

<Code />

Variants

Inline Code
const x = 42
Keyboard
CtrlK

Props Inspector

No configurable props for this component.

Documentation

Use Cases

  • Display code snippets
  • Show API keys or identifiers inline
  • Technical documentation

Do

  • Use Code for inline, CodeBlock for multiline
  • Add language prop to CodeBlock for highlighting

Don't

  • Don't use for non-code content
  • Don't nest Code inside CodeBlock