As of version 0.32, the CodeSnippet will copy the provided `code` text when clicking the copy button.
### Default (single-line) ### Inline ### Multi-line ### Custom copy feedback text Use the `feedback` prop to override the default copy button feedback text. ### Hidden copy button ### Disabled The `disabled` prop applies only to the `"single"` and `"multi"` code snippet types.
### Wrapped text `wrapText` only applies to the `"multi"` type. ### Dynamic multi-line code For dynamically updated code, you must use the `code` prop instead of the default slot. ### Hidden multi-line code There may be cases where your code snippet is hidden in the DOM. The logic to render the "Show more" button relies on the element's computed height. For hidden content, the button will not appear because the computed height is `0`. The recommended workaround is to re-render the component. See the example below. ### Skeleton The default skeleton type is `"single"`. ### Skeleton (multi-line)