New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

react-bilde

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-bilde

React Image wrapper.

latest
Source
npmnpm
Version
0.1.0
Version published
Maintainers
1
Created
Source

react-bilde

Latest npm version Build Status JavaScript Style Guide

JavaScript Style Guide

A universal react component for displaying images. [Updated fork of React Universal Image, prepared for React 16.]

Features

  • Lazy load
  • Placeholder
  • Progressive image loading (as on Medium.com)
  • Image error fallback

Installation

npm install react-bilde --save

Usage

import React from 'react';
import ReactDOM from 'react-dom';
import Image from 'react-bilde';

const App = () => {

    return (
        <div>
            <image
                src="img-400x200.jpg"
                srcSet="img-400x200.jpg 400w, img-800x400.jpg 800w"
                placeholder="img-20x10.jpg"
                ratio={2}
                fallback="image-not-found.jpg"
                className="post-image"
            />
        </div>
    );
};

ReactDOM.render(<App />, document.body);

Props

PropDescriptionTypeDefault
srcSets the src attribute of an image (required)stringundefined
srcSetSets the srcset attribute of an image.stringundefined
placeholderSpecify a placeholder image URL or Component for lazy loaded image.string/nodeundefined
blurSpecify a blur level of a placeholder image. Set 0 to disable blurring. NOTE Works only if placeholder was defined as image URLnumber3
ratioImage ascpect ratio.numberundefined
debounceDebounce Value.number200
animationSpeedAnimation Speed (in ms)number400
fallbackFallback image src.stringundefined
maxWidthImage maximum witdthnumber / stringundefined
inlineImage inline or notboolfalse
idImage identifierstringundefined
classNameImage class name.stringundefined
altSets the alt attribute of an image and placeholder.stringundefined
crossOriginSets the crossorigin attribute of an image and placeholder.stringundefined
sizesSets the sizes attribute of an image.stringundefined

Contributing

See the contribution guidelines before creating a pull request.

Polyfills

Keywords

react

FAQs

Package last updated on 09 Oct 2017

Did you know?

Socket

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