Gathering detailed insights and metrics for @react-native-masked-view/masked-view
Gathering detailed insights and metrics for @react-native-masked-view/masked-view
Gathering detailed insights and metrics for @react-native-masked-view/masked-view
Gathering detailed insights and metrics for @react-native-masked-view/masked-view
React Native Masked View Library
npm install @react-native-masked-view/masked-view
Module System
Min. Node Version
Typescript Support
Node Version
NPM Version
982 Stars
176 Commits
124 Forks
11 Watching
9 Branches
33 Contributors
Updated on 21 Nov 2024
Minified
Minified + Gzipped
JavaScript (55.92%)
Java (28.88%)
Objective-C (10.75%)
Ruby (4.45%)
Cumulative downloads
Total Downloads
Last day
-10.4%
68,192
Compared to previous day
Last week
-2.8%
359,655
Compared to previous week
Last month
2.1%
1,539,400
Compared to previous month
Last year
70.3%
14,791,750
Compared to previous year
MaskedView
Provides a React component that renders a masked view.
1yarn add @react-native-masked-view/masked-view
or
1npm install --save @react-native-masked-view/masked-view
Linking the package manually is not required anymore with Autolinking.
Remember to install the pod with:
1npx pod-install
You then need to link the native parts of the library for the platforms you are using. The easiest way to link the library is using the CLI tool by running this command from the root of your project:
1react-native link @react-native-masked-view/masked-view
Import the MaskedView
component from @react-native-masked-view/masked-view
and use it like so:
1import React from 'react'; 2import { Text, View } from 'react-native'; 3import MaskedView from '@react-native-masked-view/masked-view'; 4 5const App = () => { 6 return ( 7 <MaskedView 8 style={{ flex: 1, flexDirection: 'row', height: '100%' }} 9 maskElement={ 10 <View 11 style={{ 12 // Transparent background because mask is based off alpha channel. 13 backgroundColor: 'transparent', 14 flex: 1, 15 justifyContent: 'center', 16 alignItems: 'center', 17 }} 18 > 19 <Text 20 style={{ 21 fontSize: 60, 22 color: 'black', 23 fontWeight: 'bold', 24 }} 25 > 26 Basic Mask 27 </Text> 28 </View> 29 } 30 > 31 {/* Shows behind the mask, you can put anything here, such as an image */} 32 <View style={{ flex: 1, height: '100%', backgroundColor: '#324376' }} /> 33 <View style={{ flex: 1, height: '100%', backgroundColor: '#F5DD90' }} /> 34 <View style={{ flex: 1, height: '100%', backgroundColor: '#F76C5E' }} /> 35 <View style={{ flex: 1, height: '100%', backgroundColor: '#e1e1e1' }} /> 36 </MaskedView> 37 ); 38} 39 40export default App
The following image demonstrates that you can put almost anything behind the mask. The three examples shown are masked <View>
, <Text>
, and <Image>
.
you need to install moden-screenshot package for web usage:
1yarn add modern-screenshot
maskElement
Type | Required |
---|---|
element | Yes |
androidRenderingMode
By default hardware
rendering mode will be used for best performance, however if you need to animate your maskElement
then you’ll need to switch to software
to get your mask to update. This prop only affects Android.
Type | Required | Default |
---|---|---|
software , hardware | No | hardware |
No vulnerabilities found.
Reason
no dangerous workflow patterns detected
Reason
license file detected
Details
Reason
binaries present in source code
Details
Reason
Found 10/19 approved changesets -- score normalized to 5
Reason
5 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 4
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
project is not fuzzed
Details
Reason
security policy file not detected
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Reason
13 existing vulnerabilities detected
Details
Score
Last Scanned on 2024-11-18
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More