Image
An image element with a fallback
Features
- Automatic and manual control over when the image renders.
- Fallback part accepts any children.
- Optionally delay fallback rendering to avoid content flashing.
Install
Import
API
Root
Props | Type | Default |
---|---|---|
asChild | boolean | false |
Image
Props | Type | Default |
---|---|---|
asChild | boolean | false |
src | string | - |
Event | Type |
---|---|
loadingStatusChange | [_status: ImageLoadingStatus] |
Fallback
Props | Type | Default |
---|---|---|
asChild | boolean | false |
delayMs | number | 0 |