Code
A command or a piece of code, shown as written, with a button to copy it.
When to use it
Commands, file contents and code that must be copied exactly as written, mainly in guides and documentation.
When not to
A single word in a sentence: mark it in the text instead. It is not for long logs; link to a file to download.
Accessibility
The code keeps its lines and spaces and scrolls sideways on its own instead of the page. The block can be reached with the keyboard to scroll it. The copy button appears only where the browser can copy, and says when it did.
Related components
See it live
The component library shows this component in the default theme, in every variant: open it in the component library

