Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

material-ui-image

Package Overview
Dependencies
Maintainers
1
Versions
33
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

material-ui-image

Material style image with loading animation

  • 1.2.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
5.8K
increased by10.56%
Maintainers
1
Weekly downloads
 
Created
Source

Material UI Image Build Status

Images are ugly until they're loaded. Materialize it with material image! It will show a random material color as background and a loading animation until it's fully loaded.

See the storybook for a demo.

Installation

npm i --save material-ui-image

Usage

Use this component just like a regular img tag.

import { Image } from 'material-ui-image'

// ...

render() {
  return (
    <div>
      <Image
        src="http://loremflickr.com/300/200"
      />
    </div>
  )
}

Material UI Image Properties

NameTypeDefaultDescription
src*stringSpecifies the URL of an image.
colorstringrandom colorOverride the background color.
disableErrorboolfalseDisables the error icon if set to true.
disableSpinnerboolfalseDisables the loading spinner if set to true.
errorSizeinteger48Set the size of the error icon.
imageStyleobject{ width: 'inherit', height: 'inherit' }Override the inline-styles of the image.
loadingSizeinteger40Set the size of the refresh indicator.
loadingStyleobject{ position: 'relative' }Override the inline-styles of the refresh indicator.
onTouchTapfuncFired when the user clicks on the image happened.
styleobject{ width: 300, height: 200 }Override the inline-styles of the root element.

* required property

License

The files included in this repository are licensed under the MIT license.

Keywords

FAQs

Package last updated on 24 Mar 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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc