0.2.0 • Published 3 years ago

react-native-surround-view v0.2.0

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

react-native-surround-view

A surround view based on svg

Installation

npm install react-native-surround-view

Demo

https://user-images.githubusercontent.com/5210019/120792911-d6b3d800-c553-11eb-8a2b-95a7a4f9e4e3.mp4

Usage

import SurroundView from "react-native-surround-view";

// ...

<SurroundView width={200} height={35}>
  <Text>{'Press and hold'}</Text>
</SurroundView>

Props


width

sets width of the Surround View.

TypeRequired
numberYes

height

sets height of the Surround View.

TypeRequired
numberYes

strokeColor

sets stroke color of the Surround View.

TypeRequired
colorNo

strokeWidth

sets stroke width of the Surround View.

TypeRequired
numberNo

duration

sets duration for the animation to complete.

TypeRequired
number(milliseconds)No

onSurround

Callback function that gets called once surrounded.

TypeRequired
FunctionNo

onRelease

Callback function that gets called once released.

TypeRequired
FunctionNo

startPoint

String to determine the position to start the animation.

TypeRequired
'TOP_START' | 'TOP_END' | 'BOTTOM_START' | 'BOTTOM_END'No

style

Used to style the Surround View.

TypeRequired
ViewStyleNo

containerStyle

Used to style the View insdie svg where children is there.

TypeRequired
ViewStyleNo

Contributing

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

License

MIT