Hierarchy

  • ImageLoaderProps

Properties

alt?: string

Image's alt attribute

backgroundColor?: string

Loader's background color (default: '#CCCCCC')

fallbackSrc?: string

Fallback image url to load in case of load failure. If not set, a fallback background color will be used

foregroundColor?: string

Loader's foreground color (default: '#EEECEC')

height?: number

Image loader height (default: 50)

imageClassName?: string

CSS Class name for additional img element styles

imageTimeout?: number

Specify the amount of time the component should wait for the image source to arrive before rendering the fallback, in milliseconds (default: 2000). If the image manages to load at a later time, the image will be rendered

imgHeight?: string | number

Image height (default: undefined)

imgSrc?: string

Image's url

imgWidth?: string | number

Image width (default: undefined)

loadingSkeleton?: ReactNode

SVGRectElement used as the loading animation. If set, will replace the default SVGRectElement

onError?: ((src?) => void)

Type declaration

    • (src?): void
    • Callback emitted after the image has failed to load. Img src is sent back

      Parameters

      • Optional src: string

      Returns void

onImageClick?: ((event) => void)

Type declaration

    • (event): void
    • Callback emitted when the image element is clicked

      Parameters

      • event: MouseEvent<HTMLImageElement, MouseEvent>

      Returns void

onLoad?: ((src?) => void)

Type declaration

    • (src?): void
    • Callback emitted after the image has successfully loaded. Img src is sent back

      Parameters

      • Optional src: string

      Returns void

speed?: number

Animation speed (default: 2)

viewBox?: string

SVG's viewbox (defaults to a view box matching the given height and width), adjust this change the skeleton's rendering

width?: number

Image loader width (default: 50)

Generated using TypeDoc