Code

Show source code in a standardized way.

note:

Want to display shell code snippets? Try

Snippet

.

Default

Basic inline codes.

Code Block

Multi line code display.

width

Specify width manually, or other styles.

overlong

Out of range presentation.

APIs

Code.Props

AttributeDescriptionTypeAccepted valuesDefault
blockshow code in preboolean-false
widthset CSS widthstring-initial
...native propsHTMLAttributes'className', ...-