Documentation

Code snippet

A short block of code inside rich text, shown as copyable text.

On this page 3

When to use it

  • Inside a rich text body, when a few lines of code make the point faster than prose.

When not to use it

  • For a token name or a property inside a sentence. Write it in the paragraph instead.
  • For long files. Show the lines that matter and describe the rest.

Fields

Field Max characters Notes
Code None Required. Shown exactly as typed, in a monospace block that scrolls sideways when a line is too long. We recommend under 15 lines.
Caption 160 Optional. Shown under the code. We recommend under 120 characters: say what the code shows.