Code
Marks text to signify a short fragment of computer code.
Code marks a short fragment of computer code. It renders a native code element, which conveys
code semantics to assistive technology, and applies the theme's monospace code font.
Code: Basic
In context
Code is inline, so it inherits the surrounding size and colour and stays on one line by default.
Pass lineClamp of 2 or more, or pass textWrap, when the content should wrap.
Code: In context
API
CodeProps also accepts compatible DOM and ARIA attributes and event handlers for its rendered element.
Prop
Type