@svelte-put/copy
TypeScript icon, indicating that this package has built-in type declarations

3.0.0 • Public • Published

@svelte-put/copy

npm.badge bundlephobia.badge docs.badge

Svelte action use:copy and utility for copying text to clipboard

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 on:copied="{handleCopied}">Click to copy this</button>

Changelog

buy vnphanquang a coffee

/@svelte-put/copy/

    Package Sidebar

    Install

    npm i @svelte-put/copy

    Weekly Downloads

    246

    Version

    3.0.0

    License

    MIT

    Unpacked Size

    14.8 kB

    Total Files

    9

    Last publish

    Collaborators

    • vnphanquang