New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

react-native-drawableview

Package Overview
Dependencies
Maintainers
1
Versions
50
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-native-drawableview

Draw svg paths with shadow, android web ios

latest
Source
npmnpm
Version
2.2.5
Version published
Maintainers
1
Created
Source

DrawableView

Draw svg paths with shadows

android: api 21+
ios : 10.0+
web: svg

Getting started

$ npm install react-native-drawableview --save
$ react-native link react-native-drawableview

or

$ yarn add react-native-drawableview

IOS

cd ios

pod install

Add Swift

/ios/name_project

add a .swift file

Usage

import {DrawableView ,DrawableViewS,DrawableViewB, Color} from 'react-native-drawableview';

// (Android) DrawableViewS  -> support shadow (  Layer type Software < api 28 )
// (Android) DrawableViewB  ->Layer type None , support shadow ( Bitmap < api 28 ) 
// (Android) DrawableView  -> Layer type None 

// TODO: What to do with the module?

   var colorRed = Color('red') //Color('rgba(255,0,0,1)'), #FF0000 .....

   <DrawableViewS {...props} shadow={colorRed} />

Props

Namedescriptiontypedefault
svgKey(web) required to shadow , stroke start-end.String""
dThe shape, defined by a series of commandsString""
viewBoxdefines the position and dimension, in user spaceArray[Number] (4)undefined
alignthe aligmentStringxMidYMid
aspectaspect ratioStringmeet
opacityThe opacity attribute specifies the transparencyNumber1
fillThe fill prop refers to the color inside the shape.Colorblack
fillRuledetermines what side of a path is inside a shapeStringnonzero
fillOpacitythe opacity of the color [0 - 1]Number1
strokedefines the color of a lineColortransparent
strokeOpacitythe opacity of the line color [0 - 1]Number1
strokeWidthdefines the thickness of a lineNumber1
strokeCapline capstring'butt'
strokeJoinline joinstring'miter'
strokeMitercontrol the behavior of miterNumber4
strokeStartthe startNumber0
strokeEndthe endNumber1
dashArrayrequired for stroke (web)Number0
dashClipValue(web) required for stroke start-end != 0-1. [0 to 1] (rec:0.05)Number0
shadowset the sahdow colorColor'black'
shadowOpacityset the shadow opacity [0 - 1]Number0
shadowRadiusthe radiusNumber2
shadowOffsetset the offsetNumber2
shadowOffsetXset the offset xNumber2
shadowOffsetYset the offset yNumber2
shadowPercentageValueoffset * size (mobile)Boolfalse
shadowRectclip Region (web)Objectsize * 3

Transform


The percentageValue property (mobile) : refers to the fact that the Origin will be multiplied by the size of the view.

Nametypedefault
translateZNumber (zIndex)0
transXNumber0
transYNumber0
transPercentageValueBoolfalse
rotNumber0
rotOxNumber0
rotOyNumber0
rotPercentageValueBoolfalse
scNumber1
scXNumber1
scYNumber1
scONumber0
scOxNumber0
scOyNumber0
scPercentageValueBoolfalse

Keywords

react-native

FAQs

Package last updated on 28 Nov 2021

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