@ngx-tiny/clipboard

Angular Copy Paste Clipboard Directive. Copy content on a click.

Usage no npm install needed!

<script type="module">
  import ngxTinyClipboard from 'https://cdn.skypack.dev/@ngx-tiny/clipboard';
</script>

README

@ngx-tiny/clipboard

minzipped size last commit licence

Angular Copy Paste Clipboard Directive. Copy content on a click.

  • Angular 10 implementation
  • Works with SSR
  • No Dependencies required

Installation

$ npm i @ngx-tiny/clipboard

Documentation

Full Docs:

You can find the full documentation at https://aavanzyl.github.io/ngx-tiny which includes

  • Installation instructions
  • Usage and Demos
  • API Reference

Quick Start:

  1. Install with npm: npm install @ngx-tiny/clipboard --save

  2. Add NgxClipboardDirective to your @NgModule like example below

    
    import { NgModule } from '@angular/core';
    import { BrowserModule } from '@angular/platform-browser';
    import { NgxClipboardDirective } from '@ngx-tiny/clipboard';
    
    import { AppComponent } from './app.component';
    
    @NgModule({
        imports: [BrowserModule, NgxClipboardDirective],
        declarations: [AppComponent],
        bootstrap: [AppComponent]
    })
    
    export class AppModule { }
    
    
  3. Add the component to your view for basic

    <div [ngxClipboard]="content">{{content}}</div>
    

    The examples above are quite basic.

Support

Support me by becoming a patron and buying me a beer :)

License

See the LICENSE file.