button with elastic border
npm install react-native-squish-buttonButton with elastic border
``sh`
yarn add react-native-squish-button
or
`sh`
npm install react-native-squish-button
---
This library depends on react-native-reanimated, react-native-gesture-handler, react-native-svg.
Please, install these beforehand.
`ts
import { SquishButton } from 'react-native-squish-button';
// ...
height={100}
color="#4E5372"
squish={7}
radius={5}
text="hello"
textStyle={{
color: 'white',
fontFamily: 'Helvetica',
fontWeight: 'bold',
fontSize: 16,
}}
/>
``
| Name |description| type |required |
|---------|---------|---------|---------|
| text | Svg Text from react-native-svg |string | Yes |
| textStyle| color, fontFamily, fontWeight, fontSize for svg text |style Object | Yes |
| squish | Intensity of squish |number | Yes |
| height | Height of button |number | Yes |
| width | Width of button |number | Yes |
| radius | Radius of button |number | Yes |
| color | Background color of the button | string | Yes |
| spacing | ⚠️ This is only for internal calculation |number | No |
Help me make this library great.
See the contributing guide to learn how to contribute to the repository and the development workflow.
MIT