0.4.1 • Published 6 years ago

react-native-speech-bubble v0.4.1

Weekly downloads
4
License
MIT
Repository
github
Last release
6 years ago

react-native-speech-bubble CircleCI npm version

A speech bubble dialog component for React Native.

Install

npm install --save react-native-speech-bubble

Usage

import SpeechBubble from 'react-native-speech-bubble';
<SpeechBubble
  speeches={[ 'String 1', 'String 2', 'String 3' ]}
/>

API

PropTypeDescription
allowSkipboolSpeech bubble will be clickable before the end of the animation (Default is false)
allowSpeechReplayboolAdd a replay action at the end of the speeches (Default is false)
hideIconsboolSpeech bubble will hide icons (Default is false)
nextStyleText.propTypes.styleStyle of the "Next" icon
onSpeechEndfuncCallback that will be called at the end of the animation of the current speech
onSpeechNextfuncCallback that will be called when you triggered the next speech
onSpeechReplayfuncCallback that will be called when you triggered the replay action
speakerstringTitle of the speech bubble (Speaker or interlocutor)
speakerStyleView.propTypes.styleStyle that will be applied to the speaker view
speakerTextStyleText.propTypes.styleStyle that will be applied to the speaker text style
speechBubbleActiveOpacitynumberOpacity of the clickable bubble as a TouchableOpacity
speechBubbleStyleView.propTypes.styleStyle that will be applied to the speech bubble
speechBubbleTextStyleText.propTypes.styleStyle that will be applied to the text of the speech bubble. This is actually applied to a View element. If you want to influence the Text Component, please use typeWriterStyle instead
speechesarray of string(Required) Speeches that will be displayed into the speech bubble, one item = one bubble.
styleView.propTypes.styleStyle of the <SpeechBubble> component (container)
typeWriterStyleText.propTypes.styleStyle of the TypeWriter Text Component

License

MIT.