Actions
Clipboard
Description
The Clipboard action allows for copying data to the clipboard, contains
Usage
<script lang="ts">
import { clipboard, type ClipboardParameters } from 'action-archive';
const clipboardParameters: ClipboardParameters = {
value: 'Text to copy'
};
</script>
<button use:clipboard={clipboardParameters} on:aa_copy={...} >Copy</button>
Example
API
Parameters
Name | Type | Default | Description |
---|---|---|---|
value | string | Blob | - | The text or blob to copy to the clipboard. |
disabled | boolean | false | Disables the action. |
Events
Name | Type | Description |
---|---|---|
aa_copy | (event: CustomEvent<{ value: string | Blob }) => void | Emitted when the the value is copied to the clipboard. |