Code

The code component displays code, commands, and technical language that requires distinct visual treatment. This includes programming languages, domain-specific languages such as search syntax, terminal commands, file paths, and configuration values. This component is designed for simple, single-line code. For multi-line or more complex use cases, use Code snippet instead.

Code example

Anatomy

1
Code
The code being displayed either in-line or standalone
Code anatomy

Usage

The code component displays code, commands, and technical language that requires distinct visual treatment. This includes programming languages, domain-specific languages such as search syntax, terminal commands, file paths, and configuration values. Code uses a monospace font to distinguish it from human language, which uses the default text style.

The component appears most often within paragraph text but can also be used in lists, Tables, and other structured content.

Inline code

Use inline code for short, simple references within the normal text flow, such as commands, function names, or configuration keys. Keep inline code concise.

Code blocks

Use code block when single-line code benefits from separation from surrounding text. Code block scrolls horizontally by default if the line length exceeds the available width. For code that requires wrapping or multiple lines, use Code snippet instead.

When to use

  • To display programming code, terminal commands, or domain-specific languages
  • For technical values that should be interpreted literally
  • To present executable snippets users may copy

When not to use

  • For regular prose or human-readable text
  • For emphasis or stress (use bold or italics instead)
  • For multi-line code (use Code snippet instead)

Properties

Name Type Required Description Constraint Options Default option
Text string Yes The code that is being shown inside of the code component. - - -

Change log

WhoWhenWhat
Maximilian Blazek21.11.2025Initial commit
Maximilian Blazek13.02.2026Add links
Daniel Mutis12.01.2026Added description, anatomy and anatomy descriptions, usage guidelines and properties