Snippet
Displays copyable single-line or multiline code snippets for the command line.
Usage
Default
Sizes
You can use the following sizes: sm
, md
, lg
.
Multiline
If you want to display a multiline snippet, you can pass an array of strings to the text
prop.
Subtle Variants
You can use the following variants to obtain a subtle color snippet: warning-subtle
, info-subtle
, danger-subtle
, success-subtle
, violet-subtle
.
Fill Variants
You can use the following variants to obtain a solid color snippet: warning
, info
, danger
, success
, violet
.
API Reference
Prop | Type | Default |
---|---|---|
variant | enum | default |
size | enum | md |
text | string | string[] | ─ |