Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
react-native-linear-gradient-text
Advanced tools
Component to display text with linear gradient.
Component to display text with linear gradient
Make sure that you have installed the @react-native-masked-view/masked-view
library:
Make sure that you have installed the react-native-linear-gradient
library:
yarn add react-native-linear-gradient-text
# or
npm install react-native-linear-gradient-text
import React from 'react';
import { View, StyleSheet } from 'react-native';
import { LinearGradientText } from 'react-native-linear-gradient-text';
export const App = () => {
return (
<View style={styles.container}>
<LinearGradientText
colors={['#E76F00', '#EA374E']}
text="Hello World"
start={{ x: 0.5, y: 0 }} // Optional
end={{ x: 1, y: 1 }} // Optional
textStyle={{ fontSize: 40 }} // Optional
textProps={{ allowFontScaling: true }} // Optional
/>
</View>
);
};
const styles = StyleSheet.create({
container: {
flex: 1,
alignItems: 'center',
justifyContent: 'center',
},
});
Prop | Type | Default | Description |
---|---|---|---|
text | string | Required | An string that display text. Example: text="Hello World" |
colors | string[] | Required | An array of at least two color values that represent gradient colors. Example: colors={["black", "white"]} . |
start | { x: number, y: number } | { x: 0.5, y: 0 } | An optional prop. He declare the position that the gradient starts. Example start={{ x: 0.5, y: 0 }} . |
end | { x: number, y: number } | { x: 1, y: 1 } | Same as start, but for the of the gradient. |
textStyle | TextStyle | Default Value | A property to change all styles that a text has. |
textProps | TextProps | Default Value | A property to apply native props to text. |
This project is under the MIT license. See the LICENSE to learn more.
Contact!
FAQs
Component to display text with linear gradient.
The npm package react-native-linear-gradient-text receives a total of 173 weekly downloads. As such, react-native-linear-gradient-text popularity was classified as not popular.
We found that react-native-linear-gradient-text demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.