1.0.6 • Published 3 years ago

svelte-copy-url-button v1.0.6

Weekly downloads
2
License
MIT
Repository
github
Last release
3 years ago

svelte-copy-url-button

Simple Svelte based button that copies the current url.

version

Installation

Using npm

Sapper or Other Svelte Bundler

For Sapper you need to install the package as a dev module to so it gets compiled. If you install it as a runtime dependency you will 500 errors on the server side. This is explained here.

$ npm i -D svelte-copy-url-button

PureJS

$ npm i --save svelte-copy-url-button

Usage

Basic usage from svelte looks like this:

<script>
import SvelteCopyUrlButton from 'svelte-copy-url-button';
// If url is not passed it will copy the url of the current page
let url = "https://svelte-copy-url-button.netlify.app/"
</script>

<SvelteCopyUrlButton
  class="customClassName"
  size="14"
  defaultText="Copy url"
  copiedText="Copied!"
  icon="{false}"
  timeout="1000"
  url="{url}"
/>

Demo

1.0.6

3 years ago

1.0.5

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago