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

NameTypeDefaultDescription
valuestring | Blob-The text or blob to copy to the clipboard.
disabledbooleanfalseDisables the action.

Events

NameTypeDescription
aa_copy(event: CustomEvent<{ value: string | Blob }) => voidEmitted when the the value is copied to the clipboard.