Code
Displays inline code or code snippets
Usage
Used to display inline code or short code snippets. It styles the default HTML <code> element using design tokens to ensure consistent typography and background highlights.
Sizes
Use the size prop to change the font size and padding of the code block.
Variants
Use the variant prop to change the visual styling of the code block.
API Reference
| Prop | Type | Default |
|---|---|---|
| size | xs | sm | md | lg | xl | md |
| variant | primary | secondary | tertiary | surface | ghost | primary |
| iconOnly | boolean | false |
| asChild | boolean | undefined |

