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

react-native-turbo-image

Package Overview
Dependencies
Maintainers
1
Versions
66
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-native-turbo-image

Performant image for React native

  • 0.15.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
9.1K
increased by25.66%
Maintainers
1
Weekly downloads
 
Created
Source

You can find more examples in example folder

react-native-turbo-image

Performant React Native image component. Powered by Nuke and Coil

Features

  • Memory and Disk Cache
  • Image Processing & Decompression
  • Written in TypeScript, Swift and Kotlin
  • Support SVG and Gif

Installation

npm install react-native-turbo-image

Usage

import TurboImage from 'react-native-turbo-image';

// ...

<TurboImage
  src={url}
  style={{ width: 200, height: 200 }}
  cachePolicy="dataCache"
  blurhash="HSAH_STRING"
/>;

Props

PropTypeDefaultDescription
srcstring(required)The URL of the image
styleImageStyle(required)The style of the image
blurhashstringundefinedThe blurhash of the image to show while loading blurh.sh
cachePolicystringmemoryThe cache policy of the image
resizeModestringcontainThe resize mode of the image
showActivityIndicator (iOS only)booleanfalseWhether to show the indicator when loading
fadeDurationnumber0.3(iOS) / 0.1(Android)The transition duration of the image
borderRadiusnumberundefinedThe border radius added to the image
roundedbooleanfalseRound the image into a circle
blurnumberundefinedThe blur radius of the blur filter added to the image
monochromenumber / ColorValueundefinedThe color applied to the image
resizenumber[]undefinedThe size applied to the image
onStartfunctionundefinedThe function to call when the image is fetching
onSucessfunctionundefinedThe function to call when the image is successfully loaded
onFailurefunctionundefinedThe function to call when the image is not fetched successfully

Contributing

See the contributing guide to learn how to contribute to the repository and the development workflow.

License

MIT

Keywords

FAQs

Package last updated on 02 May 2024

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