Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

react-native-crossfade-image

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-native-crossfade-image

React Native component to update image source with crossfade transition effect

  • 1.0.2
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

React Native Crossfade Image

React Native component for changing images with crossfade transition effect when a new source prop received. Works as a replacement for React Native's Image component, both local files and remote URLs supported.

teaser

Installation

Using yarn:

yarn add react-native-crossfade-image

Using npm:

npm install react-native-crossfade-image

Usage

Note that you have to specify image dimensions using style prop.

import { CrossfadeImage } from 'react-native-crossfade-image';

const YourComponent = ({ imageSource }) => (
  <View>
    <CrossfadeImage style={{ width: 100, height: 100 }} source={imageSource} />
  </View>
);

Props

Prop NameRequiredDefaultDescription
sourceyesThe image source (either a remote URL or a local file resource)
durationno500Duration of the fade transition in ms
easingnoEasing.easeEasing function, see available options
stylenoStyle object applied to the wrapping View
resizeModeno'cover'Image resize mode, see available options
blurRadiusnoThe blur radius of the blur filter applied to the image

License

MIT

Keywords

FAQs

Package last updated on 03 Jun 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc