@svelte-put/copy
v4.0.1
Published
copy text to clipboard
Maintainers
Readme
@svelte-put/copy
Utilities for copying text to clipboard in Svelte land
svelte-put
This package is part of the @svelte-put family. For contributing guideline and more, refer to its readme.
Usage & Documentation
See the dedicated documentation page here.
Quick Start
<script lang="ts">
import { copy, type CopyDetail } from '@svelte-put/copy';
function handleCopied(e: CustomEvent<CopyDetail>) {
console.log('Text copied:', e.detail.text);
}
</script>
<button type="button" use:copy oncopied={handleCopied}>Click to copy this</button>