Format Code
Use fenced code blocks for anything longer than a short inline identifier. Add a language whenever you can so Radiant Docs can render syntax highlighting correctly.
Code blocks
Choose a language
Add a language after the opening fence to enable syntax highlighting.
Show a file name
Use title when the file name helps readers understand the snippet.
Show line numbers
Use showLineNumbers when readers need to reference a specific line.
Highlight important lines
Use curly braces after the language to highlight a single line, multiple lines, or a range.
Hide the language icon
Use hideLanguageIcon when the file name already gives enough context or you want less visual noise in the tab header.
This has a visible effect when the code block shows a filename tab, such as with title or inside a CodeGroup.
Code groups
Use CodeGroup when you want to show the same idea in multiple languages or tools.