Socket
Socket
Sign inDemoInstall

2r-image

Package Overview
Dependencies
34
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    2r-image

2R library image component implemented in React


Version published
Maintainers
1
Install size
9.78 MB
Created

Readme

Source

2r-image

2R library image component implemented in React.

Instalation

2r-image is available as an npm package. Simply run npm install 2r-image command.

To use it in your project:

import image from '2r-image'; // ES6 syntax
var image = require('2r-image'); // ES5 syntax

Usage & API

The following props can be passed to the component:

  • src (String, required): the url of the image

  • width (Number): width of the image (defaults to 'auto')

  • height (Number): height of the image (defaults to 'auto')

  • alt (String): the value of the alt attribute (defaults to '')

  • classes (String): a string of multiple classes, separated by space (defaults to '')

Examples

There is an examples folder inside the project with a minimum config. Steps to run:

  • Clone the project and

  • Run npm install

  • Run gulp examples

  • Navigate to http://localhost:5000

License

This software is released under the terms of WTFPL v2.0 license.

Keywords

FAQs

Last updated on 01 Sep 2015

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc