Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
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.
We found that react-native-linear-gradient-text demonstrated a not healthy version release cadence and project activity because the last version was released 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 researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.