Code
Show source code in a standardized way. Want to display shell code snippets? try Snippet.
General
Basic inline codes.
Code Block
Multi line code display.
width
Specify width manually, or other styles.
name
Specify the file name for the code block.
classic style
The classic design style with a line border instead of a background.
APIs
Code.Props
Attribute | Description | Type | Accepted values | Default |
---|---|---|---|---|
block | show code in pre | boolean | - | false |
name | text displayed at the top of the code block | string | - | - |
classic | display with classic style | boolean | - | false |
... | native props | HTMLAttributes | 'className', ... | - |
Contributors