Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

svelte-code-copy

Package Overview
Dependencies
Maintainers
1
Versions
45
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

svelte-code-copy

❏ Just wrap it with this

  • 1.0.38
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
4.3K
increased by70.62%
Maintainers
1
Weekly downloads
 
Created
Source

svelte-code-copy

npm-version npm-license npm-download-month npm-min-size ci.yml website

❏ Just wrap it with this

Demo

Installation

npm i svelte-code-copy

Usage

pre is optional. <CodeCopy> copies the innerText of <code>

<script>
  import { CodeCopy } from 'svelte-code-copy'
</script>

<CodeCopy>
  <pre>
    <code>
      <!-- Your code block -->
    </code>
  </pre>
</CodeCopy>

Props

full details

PropTypeDefault
onCopyfunctionundefined
sizenumber18
backgroundstringtransparent
colorstringwhitesmoke
successstringgreen
errorstringred
topstring0.5rem
rightstring0.5rem
borderstringnone
paddingstring0.25rem
borderRadiusstring0.25rem
marginstring0
effectstringpop
durationnumber150

License

MIT

Keywords

FAQs

Package last updated on 09 Dec 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc