Coder Social home page Coder Social logo

chrisburnell / paper-stamp Goto Github PK

View Code? Open in Web Editor NEW
5.0 2.0 0.0 17 KB

A Web Component to display an img as a paper stamp.

Home Page: https://chrisburnell.com/paper-stamp/

License: MIT License

JavaScript 61.57% HTML 38.43%
custom-element custom-elements customelement customelements web-component web-components webcomponent webcomponents javascript stamp

paper-stamp's Introduction

paper-stamp

A Web Component to display an img as a paper stamp

Demo | Further reading

Examples

General usage example

<script type="module" src="paper-stamp.js"></script>

<paper-stamp>
  <img src="example.jpg" alt="">
</paper-stamp>

Custom stamp color

<script type="module" src="paper-stamp.js"></script>

<paper-stamp color="cyan">
  <img src="example.jpg" alt="">
</paper-stamp>

Custom stamp padding

<script type="module" src="paper-stamp.js"></script>

<paper-stamp padding="50px">
  <img src="example.jpg" alt="">
</paper-stamp>

Custom stamp perforation size

<script type="module" src="paper-stamp.js"></script>

<paper-stamp perforation="15px">
  <img src="example.jpg" alt="">
</paper-stamp>

Custom stamp perforation spacing multiplier

<script type="module" src="paper-stamp.js"></script>

<paper-stamp spacing="6">
  <img src="example.jpg" alt="">
</paper-stamp>

Features

This Web Component presents an img to make it look like a paper stamp.

Installation

You have a few options (choose one of these):

  1. Install via npm: npm install @chrisburnell/paper-stamp
  2. Download the source manually from GitHub into your project.
  3. Skip this step and use the script directly via a 3rd party CDN (not recommended for production use)

Usage

Make sure you include the <script> in your project (choose one of these):

<!-- Host yourself -->
<script type="module" src="paper-stamp.js"></script>
<!-- 3rd party CDN, not recommended for production use -->
<script
  type="module"
  src="https://www.unpkg.com/@chrisburnell/paper-stamp/paper-stamp.js"
></script>
<!-- 3rd party CDN, not recommended for production use -->
<script
  type="module"
  src="https://esm.sh/@chrisburnell/paper-stamp"
></script>

Credit

With thanks to the following people:

paper-stamp's People

Contributors

chrisburnell avatar

Stargazers

Corey Worrell avatar  avatar Lene Saile avatar  avatar gapmiss avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.