Image

The <Image /> component will fade the image once it loads and will keep it visually hidden until it does. To use, import from @marvelapp/ui:

import { Image } from '@marvelapp/ui';

You can also apply some CSS properties to it, like display="block" for example.

No notifications yet
<Image
  alt="No notifications yet"
  maxWidth={320}
  src={image}
  src2x={imageRetina}
  width={1}
/>

Props

Prop
Type
Default
alt
string
disabled
boolean
finishedLoading
boolean
hasTransition
boolean
true
preloadImage
boolean
true
src
string
src2x
string
testId
string