0.3.0 • Published 9 months ago

react-native-squish-button v0.3.0

Weekly downloads
-
License
MIT
Repository
github
Last release
9 months ago

react-native-squish-button

Button with elastic border

Demo

Installation

yarn add react-native-squish-button

or

npm install react-native-squish-button

Dependencies


This library depends on react-native-reanimated, react-native-gesture-handler, react-native-svg. Please, install these beforehand.

Usage

import { SquishButton } from 'react-native-squish-button';

// ...

<SquishButton
    width={300}
    height={100}
    color="#4E5372"
    squish={7}
    radius={5}
    text="hello"
    textStyle={{
        color: 'white',
        fontFamily: 'Helvetica',
        fontWeight: 'bold',
        fontSize: 16,
    }}
/>

Props

Namedescriptiontyperequired
textSvg Text from react-native-svgstringYes
textStylecolor, fontFamily, fontWeight, fontSize for svg textstyle ObjectYes
squishIntensity of squishnumberYes
heightHeight of buttonnumberYes
widthWidth of buttonnumberYes
radiusRadius of buttonnumberYes
colorBackground color of the buttonstringYes
spacing⚠️ This is only for internal calculationnumberNo

Contributing

Help me make this library great.

See the contributing guide to learn how to contribute to the repository and the development workflow.

License

MIT

Social

0.3.0

9 months ago

0.2.0

9 months ago