React Native gradient buttons for your next project
npm install react-native-gradient-buttons-improved


Lightweight, customizable and haptic Gradient Buttons for React Native.

Supports press and long press actions.
Requires React and React Native.
For pure React Native projects you must install react-native-unimodules as part of Expo's bare workflow.
```
yarn add react-native-gradient-buttonsor
npm install --save react-native-gradient-buttons-improved
``ES6 import
import GradientButton from 'react-native-gradient-buttons-improved';
- style: ViewStyletext
- No default
- options: any styles you want to apply to the button
- : StringtextStyle
- No default
- options: any string
- : TextSyle{}
- default: gradientBegin
- options: any styles you want to apply to the text
- : String'#00d2ff'
- default: gradientEnd
- options: Any hex, rgb, or color
- : String'#3a47d5'
- default: gradientDirection
- options: Any hex, rgb, or color
- : String'horizontal'
- default: 'horizontal'
- options: , 'vertical', 'diagonal'height
- : Number or String (for %)75
- default: width
- options: any number
- : Number or String (for %)radius
- No default
- options: any number
- : Number50
- default: impact
- options: any number
- : Booleanfalse
- default: true
- options: or falseimpactStyle
- : String'Heavy'
- default: 'Heavy'
- options: , 'Medium', 'Light'onPressAction
- : FunctiononLongPressAction
- No default
- options: any function you want to pass to the Gradient Button
- : Functiondisabled
- No default
- options: any function you want to pass to the Gradient Button
- : BooleandisabledGradientBegin
- default: false
- : String'#D3D3D3'
- default: disabledGradientEnd
- options: Any hex, rgb, or color
- : String'#696969'
- default:
- options: Any hex, rgb, or color
Design+Code Specific Gradient Props
- purpleViolet
- violetPink
- pinkDarkGreen
- blueViolet
- blueMarine
- deepBlue
`
text="Gradient Button #1"
textStyle={{ fontSize: 20 }}
gradientBegin="#874f00"
gradientEnd="#f5ba57"
gradientDirection="diagonal"
height={60}
width={300}
radius={15}
impact
impactStyle='Light'
onPressAction={() => alert('You pressed me!')}
/>
textStyle={{ fontSize: 20 }}
gradientBegin="#874f00"
gradientEnd="#f5ba57"
gradientDirection="diagonal"
height={60}
width={300}
radius={15}
impact
impactStyle='Light'
onPressAction={() => alert('You pressed me!')}
onLongPressAction={() => alert('You long pressed me!')}
>
Gradient Button #2
``