Skip to content

Code block usage guidelines

Code block displays preformatted code or command snippets in a dedicated container with overflow scrolling when needed.

  • To show multi-line code examples in documentation.
  • To display terminal commands, configuration snippets, or JSON payloads.
  • To preserve exact whitespace and line breaks in technical content.
  • For inline code formatting; use code instead.
  • For rich text content that does not require preserved whitespace.
{
  "name": "John Doe",
  "age": 30,
  "email": "john.doe@example.com"
}