npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

react-native-gradient-texts

v0.1.0

Published

React Native component for different Gradient styled Texts for iOS & Android.

Downloads

309

Readme

About

react-native-gradient-texts is React Native component for different Gradient styled Texts for iOS & Android.


Installation

  1. Install library

    from npm

    npm install react-native-gradient-texts

    from yarn

    yarn add react-native-gradient-texts
  1. Link native code

    cd ios && pod install

Example

  1. Gradient Text with Gradient Border
import React from "react";
import { StyleSheet, SafeAreaView } from "react-native";
import GradientText from "react-native-gradient-texts";

const App = () => {
  return (
    <SafeAreaView style={styles.container}>
      <GradientText
        text={"GRADIENT TEXT"}
        fontSize={40}
        isGradientFill
        isGradientStroke
        strokeWidth={2}
        style={{ backgroundColor: "black" }}
        width={420}
        locations={{ x: 210, y: 65 }}
        borderColors={["#adfda2", "#11d3f3"]}
        gradientColors={["#6710c2", "#c81d77"]}
        fontFamily={"Gill Sans"}
      />
    </SafeAreaView>
  );
};

export default App;

const styles = StyleSheet.create({
  container: {
    flex: 1,
    alignItems: "center",
    justifyContent: "center",
  },
});
  1. Gradient Stroke Text
<GradientText
    text={'GRADIENT STROKE'}
    fontSize={35}
    isGradientStroke
    width={420}
    locations={{x: 210, y: 65}}
    strokeWidth={1.2}
    fontFamily={'Rockwell'}
/>
<GradientText
    text={'GRADIENT STROKE'}
    fontSize={40}
    style={{backgroundColor: 'black'}}
    isGradientStroke
    strokeWidth={2}
    width={420}
    locations={{x: 210, y: 65}}
    borderColors={['#b429f9', '#fdbb2d']}
/>
  1. Bordered Text
<GradientText
  text={"STROKED TEXT"}
  fontSize={50}
  fillColor={"#fdbb2d"}
  width={420}
  locations={{ x: 210, y: 75 }}
  strokeWidth={1.5}
  strokeColor={"#22c1c3"}
  fontFamily={"Marker Felt"}
/>
  1. Simple Gradient Text
<GradientText
  text={"GRADIENT TEXT"}
  fontSize={45}
  width={420}
  locations={{ x: 210, y: 65 }}
  isGradientFill
  gradientColors={["#22c1c3", "#fdbb2d"]}
/>

Props

| Props | Params Type | Default | Description | | ---------------- | ---------------------- | ---------------------- | -------------------------------------- | | text (Required) | String | '' | Text to be display | | height | Number | 100 | SVG height | | width | Number | 300 | SVG width | | gradientColors | [String, String] | ['#810955', '#533483'] | Colors for text Gradient | | borderColors | [String, String] | ['#b429f9', '#26c5f3'] | Colors for text Border/Stroke | | locations | {x: Number; y: Number} | {x: 150, y: 80} | Distance on x, y axis | | start | {x: Number; y: Number} | {x: 0, y: 0} | Start of the gradient on the x, y axis | | end | {x: Number; y: Number} | {x: 1, y: 1} | End of the gradient on the x, y axis | | isGradientFill | Boolean | false | For gradient text | | fillColor | String | '#FFFFFF' | For single colored text | | isGradientStroke | Boolean | false | For gradient Text Border | | strokeColor | String | '#000000' | For simple text border | | strokeWidth | Number | 0 | Text border Width | | fontSize | Number | 18 | Customize font size | | fontFamily | String | 'Avenir Next' | Customize font family | | fontWeight | String or Number | 900 | Customize font weight | | style | ViewStyle | {} | Styling for container view |


Author


License

This project is under the MIT license. See the LICENSE to learn more. Contact!