1.0.1 • Published 1 year ago

rn-balloon v1.0.1

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

react-native-balloon

An UI component to draw balloons.
balloon_example

Install

npm install react-native-balloon

Usage

import Balloon from "react-native-balloon";


<Balloon
  borderColor="#2E86C1"
  backgroundColor="#D6EAF8"
  borderWidth={2}
  borderRadius={20}
  triangleSize={15}
  onPress={() => console.log("press")}
>
  <Text>Hello world</Text>
</Balloon>

Properties

PropDefaultTypeDescription
width300numberwidth of balloon
heightnonenumberheight of balloon
borderColor#CCCstringcolor of border
borderWidth1numberwidth of border
borderRadius10numberradius of border
backgroundColor#FFFstringcolor of background
triangleOffset30%stringspecify the offset of triangle position from top or left as percentage.
triangleDirectionleftstringspecify the triangle direction from top/bottom/left/right.
triangleSize10numberspecify the size of triangle
containerStylenoneobjectspecify the style of balloon container.
onPressnonefunctiontriggered on press balloon.
onLongPressnonefunctiontriggered on long press balloon.

License

MIT License.