@ovok/native/image
Optimized image component.
- Stable unknown
- Release candidate since 1.16.1-rc.3
- Development since 1.16.1-dev.2111+9796905
Optimized image component.
Import from @ovok/native/image.
Components
OptimizedImage
const OptimizedImage: MemoExoticComponent<(__namedParameters) => Element>;Image that requests an Ovok-resized version for its on-screen size, retries on failure and can show a fallback.
Interfaces
OptimizedImageProps
Props for OptimizedImage; also accepts expo-image props except source and style.
Extends
Omit<ImageProps,"source"|"style">
Properties
| Property | Type | Description |
|---|---|---|
aspectRatio? | number | Width-to-height ratio of the image. |
containerStyle? | StyleProp<ViewStyle> | Style for the wrapping container. |
fallback? | any | Image shown after the bounded expo-image retry policy is exhausted. |
fit? | "fill" | "contain" | "cover" | "inside" | "outside" | How the image fits its box. |
height? | ImageDimension | Image height. |
maxRetries? | number | Number of retries attempted by expo-image before the fallback is shown. |
style? | Omit<StyleProp<ImageStyle & object>, "height" | "aspectRatio" | "width" | "contentFit"> | Image style, excluding size and fit, which have their own props. |
uri | string | Source URL of the image. |
width? | ImageDimension | Image width. |
Type Aliases
ImageDimension
type ImageDimension = number | `${number}%` | "auto";A size in pixels, a percentage string such as "50%", or "auto".
Last updated on