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

material-ui-image

Package Overview
Dependencies
Maintainers
4
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

  • 3.0.3
  • Source
  • npm
  • Socket score

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

Material UI Image

JavaScript Style Guide Build Status Greenkeeper badge

Images are ugly until they're loaded. Materialize it with material image! It will fade in like the material image loading pattern suggests.

Example

Installation

npm install material-ui-image

Note: This is the version for Material-UI 1.0.0-rc.0 or later. If you are using Material-UI 1.0.0-beta, you should update to the latest version. If you are still using Material-UI 0.x, you can use our legacy version.

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.
aspectRatiofloat(1/1)Specifies the aspect ratio of the image.
colorstringwhiteOverride the background color.
disableErrorboolfalseDisables the error icon if set to true.
disableSpinnerboolfalseDisables the loading spinner if set to true.
disableTransitionboolfalseDisables the transition if set to true.
errorIconnodeOverride the error icon.
imageStyleobject{ width: 'inherit', height: 'inherit' }Override the inline-styles of the image.
loadingnodeOverride the loading component.
onClickfuncFired when the user clicks on the image happened.
styleobjectOverride 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 05 Nov 2018

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