Wrapper for <pre>
and <code>
tags for displaying example code, with a copy to clipboard functionality.
import '@amber-ds/components/code';
<amber-code-snippet>
Content here
</amber-code-snippet>
Name | Type | Default value | Description |
---|---|---|---|
clipboard | Boolean | false | If to show the 'copy to clipboard' button |
label | String | Copy | The text of the 'copy to clipboard' button |
Name | Detail | Description |
---|---|---|
copied | { content: String } | Fired each time the user clicks the 'copy to clipboard' button and the clipboard has received data, it returns the copied text |
← Card Date picker →