Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

meetdave3/next-image-with-state

Repository files navigation

next-image-with-state

This solution helps in improving the UX by extending the Nextjs' Image component and further handling cases when an image

  1. is loading (displays a skeleton loader when loading)
  2. throws an error (when browser fails to load the image)

Usage

You can use the same way as you use Next's component

This package further adds 2 props

  1. fallback (string/required) - Pass path of the fallback image
  2. debug (boolean/optional) - Makes it easy to see how the SkeletonLoader is positioned and styled

About

Extending Next.js' <Image /> component to improve UX

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

AltStyle によって変換されたページ (->オリジナル) /