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
console.log()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
Use the
useTheme hook to access the current theme. The theme prop supports "light", "dark", and "system".API
CodeProps also accepts compatible DOM and ARIA attributes and event handlers for its rendered element.
Prop
Type