Display a snippet of copyable code for the command line.
Basic Usage
Specify width manually.
Show different states with colors.
You can completely round the corners of any type of Snippet with the rounded property.
You can use multi line of the Snippet with the array in text prop.
Hide icon for copy. (disable copy)
You can custom symbol of the Snippet with the property symbol.
You can custom toast of the Snippet with the property toastText and toastType.
Show different states filled with colors.
| Attribute | Description | Type | Accepted values | Default |
|---|---|---|---|---|
| text | code snippet | string string[] | - | - |
| type | snippet types | SnippetTypes | SnippetTypes | default |
| filled | filled style | boolean | - | false |
| width | set CSS string | string | - | initial |
| copy | function of copy button | CopyTypes | CopyTypes | default |
| symbol | symbol snippet | string | - | $ |
| toastText | toast text | string | - | Copied to clipboard! |
| toastType | toast type | ToastTypes | ToastTypes | success |
| ... | native props | HTMLAttributes | 'id', 'name', 'className', ... | - |
type SnippetTypes =
| 'default'
| 'primary'
| 'secondary'
| 'success'
| 'warning'
| 'error'
| 'info'
type CopyTypes = 'default' | 'silent' | 'prevent'
type ToastTypes =
| 'default'
| 'primary'
| 'secondary'
| 'success'
| 'warning'
| 'error'
| 'info'
Previous
Slider
Next
Spacer

