Code
Code renders the native inline <code> element. Use it for identifiers,
commands, package names, and short code fragments inside prose; use a dedicated
code block for multiline source.
Import Button from @manti-ui/react, then use the variant prop to choose its emphasis.
API
Code accepts every native <code> attribute in addition to the props below.
| Prop | Type | Default | Description |
|---|---|---|---|
size | 'sm' | 'md' | 'sm' | Visual size of the inline code. |
Styling
Anatomy
| Part | Selector | Description |
|---|---|---|
root | [data-scope="code"][data-part="root"] | The semantic inline <code> element. |
Tokens
| Token | Controls |
|---|---|
--manti-code-radius | radius |
--manti-code-padding-x | padding x |
--manti-code-padding-y | padding y |
--manti-code-font-size | font size |