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 use Code Decorator for short snippets within text.
Don't use Code Decorator for longer code snippets or code blocks (use Code Editor instead).
Don't change its color or add icons.