Image
Drop-in replacement for the standard React Native Image component that displays
images with a placeholder and smooth image load transitioning.
#
Usage#
Props#
Image- Component
- ImageComponent
- PlaceholderContent
- childrenContainerStyle
- containerStyle
- onLongPress
- onPress
- placeholderStyle
- transition
- transitionDuration
#
Reference#
Image#
ComponentDefine the component passed to image.
Type | Default |
---|---|
React Component | Pressable or View |
#
ImageComponentSpecify a different component as the Image component.
Type | Default |
---|---|
any | None |
#
PlaceholderContentContent to load when Image is rendering.
Type | Default |
---|---|
any | None |
#
childrenContainerStyleAdditional styling for the children container.
Type | Default |
---|---|
View style(Object) | null |
#
containerStyleAdditional styling for the container.
Type | Default |
---|---|
View style(Object) | None |
#
onLongPressCalled when a long-tap gesture is detected.
Callback function when long pressing component.
Type | Default |
---|---|
((event: GestureResponderEvent) => void) and (() => void) | None |
#
onPressCalled when a single tap gesture is detected.
Callback function when pressing component.
Type | Default |
---|---|
((event: GestureResponderEvent) => void) and (() => void) | None |
#
placeholderStyleAdditional styling for the placeholder container.
Type | Default |
---|---|
View style(Object) | None |
#
transitionPerform fade transition on image load.
Type | Default |
---|---|
boolean | None |
#
transitionDurationPerform fade transition on image load.
Type | Default |
---|---|
number | 360 |