cryptokred-coin

2.0.1 • Public • Published

Coin

A JavaScript widget to handle rendering a CryptoKred coin.

Installation

You can install into your project using npm:

    npm i cryptokred-coin

Usage

    // pull in CSS
    require('cryptokred-coin/src/coin.css');

    // pull in module
    var Coin = require('cryptokred-coin');

    var coin = new Coin({
        // required - root element for the coin
        container: document.getElementById('coin'),

        // one of image or video (not both) is required - url of the image or video in the circle
        image: 'assets/example.jpg',
        video: 'assets/example.mp4',

        // optional - width of the coin
        width: 500,

        // optional - text for upper and lower part of coin
        upperText: 'Coin Title',
        lowerText: '1Kred - 2',

        // optional - default is Gold
        color: 'blue',

        // optional - base URL for finding patterns (see images/patterns/*)
        patternBase: 'assets/images/patterns/',

        // optional - pattern file name (excluding .svg extension) to use for coin
        pattern: 'jigsaw',

        // optional - color to use for the coin pattern
        patternColor: 'green'
    });

/cryptokred-coin/

    Package Sidebar

    Install

    npm i cryptokred-coin

    Weekly Downloads

    1

    Version

    2.0.1

    License

    UNLICENSED

    Unpacked Size

    863 kB

    Total Files

    132

    Last publish

    Collaborators

    • angelapeoplebrowsr
    • jesseskinner