43 lines
1.3 KiB
Plaintext

---
title: "Code"
description: "Code is a component used to display inline code. "
url: https://nextui.org/docs/components/code
---
# Code
Code is a component used to display inline code.
<ComponentLinks component="code" />
---
## Import
```jsx
import {Code} from "@nextui-org/react";
```
## Usage
<CodeDemo title="Usage" files={codeContent.usage} />
### Sizes
<CodeDemo title="Sizes" files={codeContent.sizes} />
### Colors
<CodeDemo title="Colors" files={codeContent.colors} />
## API
### Code Props
| Attribute | Type | Description | Default |
| --------- | --------------------------------------------------------------------------- | ------------------------ | --------- |
| children | `ReactNode` | The content of the code. | - |
| size | `xs` \| `sm` \| `md` \| `lg` \| `xl` | The size of the code. | `sm` |
| color | `default` \| `primary` \| `secondary` \| `success` \| `warning` \| `danger` | The color of the code. | `default` |
| radius | `none` \| `base` \| `xs` \| `sm` \| `md` \| `lg` \| `xl` \| `full` | The radius of the code. | `lg` |