react-native-fast-image

  • Version 8.6.3
  • Published
  • 104 kB
  • No dependencies
  • (MIT AND Apache-2.0) license

Install

npm i react-native-fast-image
yarn add react-native-fast-image
pnpm add react-native-fast-image

Overview

🚩 FastImage, performant React Native image component.

Index

Variables

variable cacheControl

const cacheControl: {
readonly immutable: 'immutable';
readonly web: 'web';
readonly cacheOnly: 'cacheOnly';
};

    variable FastImage

    const FastImage: any;

      variable priority

      const priority: {
      readonly low: 'low';
      readonly normal: 'normal';
      readonly high: 'high';
      };

        variable resizeMode

        const resizeMode: {
        readonly contain: 'contain';
        readonly cover: 'cover';
        readonly stretch: 'stretch';
        readonly center: 'center';
        };

          Interfaces

          interface FastImageProps

          interface FastImageProps extends AccessibilityProps, ViewProps {}

            property children

            children?: React.ReactNode;
            • Render children within the image.

            property defaultSource

            defaultSource?: ImageRequireSource;

              property fallback

              fallback?: boolean;

                property onLayout

                onLayout?: (event: LayoutChangeEvent) => void;
                • onLayout function

                  Invoked on mount and layout changes with

                  {nativeEvent: { layout: {x, y, width, height}}}.

                property resizeMode

                resizeMode?: ResizeMode;

                  property source

                  source?: Source | ImageRequireSource;

                    property style

                    style?: StyleProp<ImageStyle>;
                    • Style

                    property testID

                    testID?: string;
                    • A unique identifier for this element to be used in UI Automation testing scripts.

                    property tintColor

                    tintColor?: ColorValue;
                    • TintColor

                      If supplied, changes the color of all the non-transparent pixels to the given color.

                    method onError

                    onError: () => void;

                      method onLoad

                      onLoad: (event: OnLoadEvent) => void;

                        method onLoadEnd

                        onLoadEnd: () => void;

                          method onLoadStart

                          onLoadStart: () => void;

                            method onProgress

                            onProgress: (event: OnProgressEvent) => void;

                              interface FastImageStaticProperties

                              interface FastImageStaticProperties {}

                                property cacheControl

                                cacheControl: typeof cacheControl;

                                  property clearDiskCache

                                  clearDiskCache: () => Promise<void>;

                                    property clearMemoryCache

                                    clearMemoryCache: () => Promise<void>;

                                      property preload

                                      preload: (sources: Source[]) => void;

                                        property priority

                                        priority: typeof priority;

                                          property resizeMode

                                          resizeMode: typeof resizeMode;

                                            interface ImageStyle

                                            interface ImageStyle extends FlexStyle, TransformsStyle, ShadowStyleIOS {}

                                              property backfaceVisibility

                                              backfaceVisibility?: 'visible' | 'hidden';

                                                property backgroundColor

                                                backgroundColor?: string;

                                                  property borderBottomLeftRadius

                                                  borderBottomLeftRadius?: number;

                                                    property borderBottomRightRadius

                                                    borderBottomRightRadius?: number;

                                                      property borderColor

                                                      borderColor?: string;

                                                        property borderRadius

                                                        borderRadius?: number;

                                                          property borderTopLeftRadius

                                                          borderTopLeftRadius?: number;

                                                            property borderTopRightRadius

                                                            borderTopRightRadius?: number;

                                                              property borderWidth

                                                              borderWidth?: number;

                                                                property opacity

                                                                opacity?: number;

                                                                  property overlayColor

                                                                  overlayColor?: string;

                                                                    interface OnLoadEvent

                                                                    interface OnLoadEvent {}

                                                                      property nativeEvent

                                                                      nativeEvent: {
                                                                      width: number;
                                                                      height: number;
                                                                      };

                                                                        interface OnProgressEvent

                                                                        interface OnProgressEvent {}

                                                                          property nativeEvent

                                                                          nativeEvent: {
                                                                          loaded: number;
                                                                          total: number;
                                                                          };

                                                                            Type Aliases

                                                                            type Priority

                                                                            type Priority = 'low' | 'normal' | 'high';

                                                                              type ResizeMode

                                                                              type ResizeMode = 'contain' | 'cover' | 'stretch' | 'center';

                                                                                type Source

                                                                                type Source = {
                                                                                uri?: string;
                                                                                headers?: {
                                                                                [key: string]: string;
                                                                                };
                                                                                priority?: Priority;
                                                                                cache?: Cache;
                                                                                };

                                                                                  Package Files (1)

                                                                                  Dependencies (0)

                                                                                  No dependencies.

                                                                                  Dev Dependencies (14)

                                                                                  Peer Dependencies (2)

                                                                                  Badge

                                                                                  To add a badge like this onejsDocs.io badgeto your package's README, use the codes available below.

                                                                                  You may also use Shields.io to create a custom badge linking to https://www.jsdocs.io/package/react-native-fast-image.

                                                                                  • Markdown
                                                                                    [![jsDocs.io](https://img.shields.io/badge/jsDocs.io-reference-blue)](https://www.jsdocs.io/package/react-native-fast-image)
                                                                                  • HTML
                                                                                    <a href="https://www.jsdocs.io/package/react-native-fast-image"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>