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

react-native-css-gradient

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-native-css-gradient

CSS Gradient for LinearGradient component.

  • 0.2.2
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
109
decreased by-24.31%
Maintainers
1
Weekly downloads
 
Created
Source

CSS Gradient for LinearGradient

CSS background image for React-Native. Supported backgrounds:

  • linear-gradient
  • repeating-linear-gradient

image





Usage

import Gradient from 'react-native-css-gradient`;

render() {
    const gradient = `linear-gradient(-225deg, #231557 0%, #44107A 29%, #FF1361 67%, #FFF800 100%), repeating-linear-gradient(-115deg, transparent, transparent 20px, rgba(255,255,255,0.1) 20px, rgba(255,255,255,0.1) 40px), repeating-linear-gradient(115deg, transparent, transparent 20px, rgba(255,255,255,0.1) 20px, rgba(255,255,255,0.1) 40px)`;

    return <Gradient gradient={gradient} style={yourStyle}>
}

This library will first try to import LinearGradient from Expo or fallback to react-native-linear-gradient.

Props

PropDetails
gradientCSS Gradient (linear and repeating) are working for the moment
styledefault styles (Note, if you're going to use repeating gradient you have to specify the width and height)
children-

About

If you have questions please don't hesistate to contact me on Twitter.

FAQs

Package last updated on 16 Oct 2018

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