# GradientText

GradientText component helps you create gradient texts based on Svg in React Native.

# Usage

import { GradientText } from '@/components/GradientText'

export const GradientHelloWorld = () => (
    <GradientText
        fontSize={80}
        text={t(i18n)`Hello World`}
        svgProps=2
        gradients={[
            { color: '#FFED22', offset: 0 },
            { color: '#FF7308', offset: 1 },
        ]}
        strokeGradients={[
            { color: '#FFD181', offset: 0 },
            { color: '#FFC64B', offset: 1 },
        ]}
    />
)

# Props

Props Types Default Description
text string '' Text to be displayed
fontSize number Font size
gradients Array<{ color: ColorValue; offset: number }> Colors and offsets of gradient text
strokeGradients Array<{ color: ColorValue; offset: number }> Colors and offsets of gradient borders
fontWeight number 800 Font weight
height number fontSize * 2 Height of Svg
start { x: number; y: number } { x: 0, y: 0 } Start of the gradient on the x, y axis
end { x: number; y: number } { x: 0, y: 1 } End of the gradient on the x, y axis
textProps TextProps Text props defined in react-native-svg lib
svgProps SvgProps Svg props defined in react-native-svg lib