You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
| **src** | String | | true | The source of the image to load |
416
-
| **alt** | String | | false | The alt text description of the image you are loading |
417
-
| **srcSet** | String | | false | If your images use srcset, you can pass the `srcSet` prop to provide that information for preloading. |
418
-
| **sizes** | String | | false | If your images use srcset, the sizes attribute helps the browser decide which source to load. |
419
-
| **actual** | Function (render callback) of type ({imageProps}) => React.ReactNode | | true | Component to display once image has loaded |
420
-
| **placeholder** | Function (render callback) of type ({imageProps, ref}) => React.ReactNode | undefined | true | Component to display while no request for the actual image has been made |
421
-
| **loading** | Function (render callback) of type () => React.ReactNode | placeholder | false | Component to display while the image is loading |
422
-
| **error** | Function (render callback) of type () => React.ReactNode | actual (broken image) | false | Component to display if the image loading has failed (render prop) |
423
-
| **loadEagerly** | Boolean | false | false | Whether to skip checking for viewport and always show the 'actual' component |
424
-
| **observerProps** | {threshold: number, rootMargin: string} | {threshold: 0.01, rootMargin: "50px0px"} | false | Subset of props for the IntersectionObserver |
413
+
| Name | Type | Default | Required | Description |
| **src** | String | | true | The source of the image to load |
416
+
| **alt** | String | | false | The alt text description of the image you are loading |
417
+
| **srcSet** | String | | false | If your images use srcset, you can pass the `srcSet` prop to provide that information for preloading. |
418
+
| **sizes** | String | | false | If your images use srcset, the sizes attribute helps the browser decide which source to load. |
419
+
| **actual** | Function (render callback) of type ({imageProps}) => React.ReactNode | | true | Component to display once image has loaded |
420
+
| **placeholder** | Function (render callback) of type ({imageProps, ref}) => React.ReactNode | undefined | true | Component to display while no request for the actual image has been made |
421
+
| **loading** | Function (render callback) of type () => React.ReactNode | placeholder | false | Component to display while the image is loading |
422
+
| **error** | Function (render callback) of type () => React.ReactNode | actual (broken image) | false | Component to display if the image loading has failed (render prop) |
423
+
| **loadEagerly** | Boolean | false | false | Whether to skip checking for viewport and always show the 'actual' component |
424
+
| **observerProps** | {threshold: number, rootMargin: string} | {threshold: 0.01, rootMargin: "50px0px"} | false | Subset of props for the IntersectionObserver |
425
+
| **experimentalDecode** | Boolean | false | false | Decode the image off-main-thread using the Image Decode API. Test before using! |
425
426
426
427
**`<LazyImageFull />`** accepts the following props:
427
428
428
-
| Name | Type | Default | Required | Description |
| **src** | String | | true | The source of the image to load |
431
-
| **alt** | String | | false | The alt text description of the image you are loading |
432
-
| **srcSet** | String | | false | If your images use srcset, you can pass the `srcSet` prop to provide that information for preloading. |
433
-
| **loadEagerly** | Boolean | false | false | Whether to skip checking for viewport and always show the 'actual' component |
434
-
| **observerProps** | {threshold: number, rootMargin: string} | {threshold: 0.01, rootMargin: "50px0px"} | false | Subset of props for the IntersectionObserver |
435
-
| **children** | Function of type ({imageProps, imageState, ref}) => React.ReactNode | | true | Function to call that renders based on the props and state provided to it by LazyImageFull |
429
+
| Name | Type | Default | Required | Description |
| **src** | String | | true | The source of the image to load |
432
+
| **alt** | String | | false | The alt text description of the image you are loading |
433
+
| **srcSet** | String | | false | If your images use srcset, you can pass the `srcSet` prop to provide that information for preloading. |
434
+
| **sizes** | String | | false | If your images use srcset, the sizes attribute helps the browser decide which source to load. |
435
+
| **loadEagerly** | Boolean | false | false | Whether to skip checking for viewport and always show the 'actual' component |
436
+
| **observerProps** | {threshold: number, rootMargin: string} | {threshold: 0.01, rootMargin: "50px0px"} | false | Subset of props for the IntersectionObserver |
437
+
| **children** | Function of type ({imageProps, imageState, ref}) => React.ReactNode | | true | Function to call that renders based on the props and state provided to it by LazyImageFull |
438
+
| **experimentalDecode** | Boolean | false | false | Decode the image off-main-thread using the Image Decode API. Test before using! |
436
439
437
440
[You can consult Typescript types in the code](./src/LazyImage.tsx) for more context.
0 commit comments