All Projects → frzkn → use-images-loaded

frzkn / use-images-loaded

Licence: MIT license
🖼️ Returns true once all the images inside a container are loaded

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to use-images-loaded

React Native Swiper Flatlist
👆 Swiper component implemented with FlatList using Hooks & Typescript + strict automation tests with Detox
Stars: ✭ 217 (+164.63%)
Mutual labels:  hooks, images
osbuild
Build-Pipelines for Operating System Artifacts
Stars: ✭ 95 (+15.85%)
Mutual labels:  images
react-hooks-form
React Forms the Hooks Way
Stars: ✭ 25 (-69.51%)
Mutual labels:  hooks
dotEngine-android-sdk-example
dotEngine android sdk example
Stars: ✭ 29 (-64.63%)
Mutual labels:  custom
instagram-get-images
Instagram get images 🌄 (hashtags, account, locations) with puppeteer
Stars: ✭ 69 (-15.85%)
Mutual labels:  images
av.imageview
Titanium native ImageView module that extends the default Titanium ImageView with more capabilities and a different caching system.
Stars: ✭ 97 (+18.29%)
Mutual labels:  images
on-outside-click-hook
A React custom hook to detect clicks which triggers outside the element and then fire an event.
Stars: ✭ 17 (-79.27%)
Mutual labels:  hooks
crypto-watchdog
Crypto Watchdog is an open-source developer friendly project, periodically queries crypto market and notifies potential pumps & recently added tokens/coins via web-hooks.
Stars: ✭ 22 (-73.17%)
Mutual labels:  hooks
react-use-comlink
Three ways to use Comlink web workers through React Hooks (and in a typesafe manner).
Stars: ✭ 39 (-52.44%)
Mutual labels:  hooks
CustomVideoRecording
Custom video recording based on AVFoundation.
Stars: ✭ 20 (-75.61%)
Mutual labels:  custom
dobux
🍃 Lightweight responsive state management solution.
Stars: ✭ 75 (-8.54%)
Mutual labels:  hooks
use-latest
No description or website provided.
Stars: ✭ 18 (-78.05%)
Mutual labels:  hooks
uni-design
基于React hooks的一套基础组件
Stars: ✭ 22 (-73.17%)
Mutual labels:  hooks
react-crossfade-image
react-crossfade-image - Simple React component for crossfading images - No CSS needed
Stars: ✭ 33 (-59.76%)
Mutual labels:  images
framer-motion-hooks
Fill the hook gap in Framer Motion
Stars: ✭ 160 (+95.12%)
Mutual labels:  hooks
react-generate-context
A helper function for reducing React Context boilerplate
Stars: ✭ 24 (-70.73%)
Mutual labels:  hooks
react-useForm
World's simplest React hook to manage form state
Stars: ✭ 30 (-63.41%)
Mutual labels:  hooks
DICOM.jl
Julia package for reading and writing DICOM (Digital Imaging and Communications in Medicine) files
Stars: ✭ 45 (-45.12%)
Mutual labels:  images
use-smooth-scroll
React hook which gives a smooth scrolling function.
Stars: ✭ 41 (-50%)
Mutual labels:  hooks
pyinstaller-hooks-contrib
Community maintained hooks for PyInstaller.
Stars: ✭ 66 (-19.51%)
Mutual labels:  hooks

🖼️ useImagesLoaded

Custom react hook which returns true once all the images inside a container are loaded.

Check out a working demo here

🚀 Getting Started

Installation

yarn add use-images-loaded

Usage

Displaying a loading indicator while images are loading in a container

import useImageLoaded from 'use-images-loaded'

const ImageContainer = () => {
  const [ref, loaded] = useImagesLoaded()

  return (
    <div ref={ref}>
    <p> Status: {loaded ? 'Loaded': 'Loading'} </p>
    <img src="https://unsplash.it/200/200" alt="image"/>
    <img src="https://unsplash.it/200/200" alt="image"/>
    <img src="https://unsplash.it/200/200" alt="image"/>
    </div>
  )
}
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].