npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

polaroid-image

v1.0.3

Published

Turn any image into a polaroid!

Downloads

5

Readme

polaroid-image

Convert any image into a polaroid!

Install

$ npm install polaroid-image

Usage

let Polaroid = require('polaroid-image');

Images

####This package has several optional props If imgSrc prop (must be of type string) is not specified, then a default image will appear.

ex:

<Polaroid imgSrc='yourimageurlhere' />

####Optional props:

text (must be of type string) - adds text to polaroid

ex.

text='your_text_here'

rotate (must be of type string) - rotate polaroid

ex.

rotate='-15' - rotates polaroid left by 15 degrees

rotate='30' - rotates polaroid right by 30 degrees

zoom (typeof string or boolean)

ex.

zoom='scale(1.5)'

zoom='false' - won't scale on hover

imageShadow (typeof string or boolean)

ex.

imageShadow='0 0 10px blue'

imageShadow='false' - removes image shadow

frameShadow (typeof string or boolean)

ex.

frameShadow='5px 2px 5px red'

frameShadow='false' - removes frame shadow

hoverFrameShadow (typeof string or boolean)

ex.

hoverFrameShadow='0 0 30px black'

hoverFrameShadow='false' - removes frame shadow on hover

frameMargin (must be of type string)

ex.

frameMargin='1em 2em' - 1em margin for top/bottom and 2em right/left

frameWidth (must be of type string)

ex.

frameWidth='50px' - changes frame width to 50px

imageMargin (must be of type string)

ex.

imageMargin='10px' - margin of image is 10px for top/right/bottom/left

imageWidth (must be of type string)

ex.

imageWidth='25px' -image width is now 25px

imageHeight (must be of type string)

ex.

imageHeight='100px' - imageHeight is now 100px

frameHeight (must be of type string)

ex.

frameHeight='200px' - frame height is now 200px

imgClass (must be of type string) - adds a class to image to make it easy to style in css.

ex.

imgClass='yourClassName'

in css file:

.yourClassName {
	padding: 2em
}
/*Image top/right/bottom/left will now have a padding of 2em*/

NOTE

Trying to change a style through css will NOT WORK if it exists as a prop. To style that specific element just change through props

ex.

<Polaroid
  imgSrc='imageUrlHere' //url of an image
  frameColor='black' //sets the frame color to black
  imageMargin='3em' //sets image top-right-bottom-left margins to 3em
  imgClass='targetImage' // adds a class to the image
/>

Since the 'border' element is not part of any of the components props, targeting through css WILL work.

ex.

Inside the css file:

.targetImage {
    border: 5px solid black;
}
/*this will add a border of 5px around the IMAGE only*/