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

@dztek/ui

Package Overview
Dependencies
Maintainers
2
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@dztek/ui

UI components, actions, and services for app assembling

  • 1.0.3
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
3
decreased by-72.73%
Maintainers
2
Weekly downloads
 
Created
Source

@dztek/ui

UI components, actions, and services for app assembling

Svelte Actions

clickToCopy

Click any HTML element to copy its contents. Works on regular elements as well as input elements.

Regular element example:

This will copy the text within the element with the clickToCopy action after it has been clicked

<script>
  import { clickToCopy } from "@dztek/ui/lib/actions/click-to-copy";
</script>

<div use:clickToCopy>
  Something to copy
</div>
Button example:

This will copy the text inside the bound target elment to clipboard when the element with the clickToCopy action is clicked

<script>
  import { clickToCopy } from "@dztek/ui/lib/actions/click-to-copy";

  let el;
</script>

<div bind:this={el}>
  To be copied on button press!
</div>

<button use:clickToCopy={el}>
  Copy to clipboard
</button>
Text example:

This will copy provided text to clipboard when the element with the clickToCopy action is clicked

<script>
  import { clickToCopy } from "@dztek/ui/lib/actions/click-to-copy";

  const text = "Some text to copy";
</script>

<button use:clickToCopy={text}>
  Copy to clipboard
</button>

Keywords

FAQs

Package last updated on 07 Feb 2022

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