Code Decorator

A styled inline code element for highlighting technical terms, commands, and snippets within text.

Usage guidelines outline how the component should and shouldn’t be used in different user interface contexts.

When to use

  • To reference commands, variables, file names, or brief code fragments without breaking the flow of surrounding content
  • To ensure that short code snippets are easily identified within text

When not to use

  • If you need longer code snippets or code blocks (use Code Editor instead)

Best practices

Do

Do use Code Decorator for short snippets within text.

Don't

Don't use Code Decorator for longer code snippets or code blocks (use Code Editor instead).

Don't

Don't change its color or add icons.