All Projects → gaddafirusli → React Native Image Overlay

gaddafirusli / React Native Image Overlay

Licence: mit
React Native's ImageBackground with overlay

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to React Native Image Overlay

Sobel
Sobel Filter algorithm in JavaScript.
Stars: ✭ 69 (-16.87%)
Mutual labels:  image
Network Avatar Picker
A npm module that returns user's social network avatar. Supported providers: facebook, instagram, twitter, tumblr, vimeo, github, youtube and gmail
Stars: ✭ 74 (-10.84%)
Mutual labels:  image
Abmediaview
Media view which subclasses UIImageView, and can display & load images, videos, GIFs, and audio and from the web, and has functionality to minimize from fullscreen, as well as show GIF previews for videos.
Stars: ✭ 79 (-4.82%)
Mutual labels:  image
Skrop
Image transformation service using libvips, based on Skipper.
Stars: ✭ 71 (-14.46%)
Mutual labels:  image
Laravel Imageupload
Upload image using Laravel's build in function and resize it automatically.
Stars: ✭ 73 (-12.05%)
Mutual labels:  image
Summernote Image Attributes
Summernote plugin to edit image attributes
Stars: ✭ 78 (-6.02%)
Mutual labels:  image
Imageslideshow
A Swift Image SlideShow for iOS
Stars: ✭ 68 (-18.07%)
Mutual labels:  image
React Images Uploading
The simple images uploader applied Render Props pattern that allows you to fully control UI component and behaviors.
Stars: ✭ 80 (-3.61%)
Mutual labels:  image
Davinci
An esay-to-use image downloading and caching library for Unity
Stars: ✭ 74 (-10.84%)
Mutual labels:  image
Docker Nginx Image Proxy
on the fly image cropping with gravity, resize and compression microservice
Stars: ✭ 79 (-4.82%)
Mutual labels:  image
Php Fpm
Docker container to install and run PHP-FPM
Stars: ✭ 71 (-14.46%)
Mutual labels:  image
Macimagesetgenerator
2个脚本文件,帮助你在Mac上,生成Xcode可使用的APP图标和启动图。
Stars: ✭ 73 (-12.05%)
Mutual labels:  image
Pixelate
Pixelate an image with canvas.
Stars: ✭ 78 (-6.02%)
Mutual labels:  image
Term Img Cli
Display images in iTerm
Stars: ✭ 70 (-15.66%)
Mutual labels:  image
Jekyll Cloudinary
Jekyll plugin adding a Liquid tag for Cloudinary, for better responsive images
Stars: ✭ 79 (-4.82%)
Mutual labels:  image
Picker
Picker - A CameraX based WhatsApp Style Image-Video Picker
Stars: ✭ 69 (-16.87%)
Mutual labels:  image
React Image Timeline
📆 An image-centric timeline component for React.js
Stars: ✭ 77 (-7.23%)
Mutual labels:  image
Packer Ubuntu 1404
DEPRECATED - Packer Example - Ubuntu 14.04 Vagrant Box using Ansible provisioner
Stars: ✭ 81 (-2.41%)
Mutual labels:  image
The Zen Of Python Poster
🌀 A beautiful poster made to remind you of Tim Peters' renowned “Zen of Python”. The guiding principles of a Pythonista.
Stars: ✭ 79 (-4.82%)
Mutual labels:  image
Packer Centos 6
This build has been moved - see README.md
Stars: ✭ 78 (-6.02%)
Mutual labels:  image

react-native-image-overlay

React Native ImageBackground is useful. But you know what's even more useful?
ImageBackground with overlay. This is exactly it.

Header image


npm

Get Started

Installation

$ npm install --save react-native-image-overlay

Usage

import ImageOverlay from "react-native-image-overlay";

export class MyApp extends Component {
    render () {
        return (
            // For external image
            <ImageOverlay source={{ uri:"http://example.com/img/cool.jpg" }} />
            // For local asset
            <ImageOverlay source={require("../../assets/banner.png")} />
        )
    }
}

Props

Prop Description Type Default
blurRadius The blur radius of the blur filter added to the image Number undefined
containerStyle Additional styling for the component ViewStyle undefined
contentPosition Position of title text or child component (if any). String ("top","center" or "bottom") "center"
height The height of the whole component Number 300
overlayColor The color to be used for the overlay on top of the image String "#000000"
overlayAlpha Opacity value of the overlay. From 0 to 1 Number 0.5
rounded Value for borderRadius to be applied to the component Number undefined
source The image source (either a remote URL or a local file resource). ImageSource
title Text to be displayed over the image String undefined
titleStyle Additional styling for the title text TextStyle undefined

Example

1. Simple overlay color

The most basic use-case of this module is to add colored overlay on top of your image.

<ImageOverlay source={{ uri:"http://example.com/img/cool.jpg" }} />

Default overlay is color is #000000 with 0.5 opacity. You can customize it to any color

<ImageOverlay
    source={{ uri:"http://example.com/img/cool.jpg" }}
    overlayColor="cyan"
    overlayAlpha={0.8} />

2. Overlay with title text

Title text image

If you want to display a simple white text on top of the image, you can use the title prop.

<ImageOverlay
    source={{ uri:"http://example.com/img/cool.jpg" }}
    title="This is the title" />

The title will be center-ed by default. You can move it to the top or bottom using the contentPosition prop

<ImageOverlay
    source={{ uri:"http://example.com/img/cool.jpg" }}
    title="This is the title"
    contentPosition="bottom" />

Additionally, you can change the styling by passing the titleStyle along

<ImageOverlay
    source={{ uri:"http://example.com/img/cool.jpg" }}
    title="This is the title"
    titleStyle={{ color: 'yellow', fontWeight: 'bold' }} />

3. Overlay with child component

Child component image

You can pass extra components to be displayed on top of your image.

<ImageOverlay
  source={{ uri:"http://example.com/img/cool.jpg" }}
  height={0.7 * height} 
  contentPosition="bottom">
    <View>
        <Image style={styles.avatar} source={{uri:"http://example.com/user/avatar.png"}} />
        <Text style={styles.name}>Amelia Edwards</Text>
        <Text style={styles.location}>Kuala Lumpur, Malaysia</Text>
        <Button text="Follow me" />
    </View>
</ImageOverlay>

Note: When you are using child component, title prop will be ignored.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].