# @devpranavsharma/react-native-chat-box

> a fully customisable chat component

Latest version **0.1.2** (published 2023-11-06) · MIT license · 0 weekly downloads

## Install

```sh
npm install @devpranavsharma/react-native-chat-box
pnpm add @devpranavsharma/react-native-chat-box
yarn add @devpranavsharma/react-native-chat-box
bun add @devpranavsharma/react-native-chat-box
```

## Health

**Score 30/100 (F)** — status: abandoned.

Positive: has types; esm support; no vulnerabilities; high quality score.

Warnings: low downloads; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.2 |
| Published | 2023-11-06 |
| First published | 2023-11-06 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Node | >= 18.0.0 |
| Dependencies | 2 |
| Unpacked size | 63.8 KB |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 0 |
| Author | devpranavsharma |
| Maintainers | devpranavsharma |
| Keywords | react-native, ios, android |

## Links

- npm: https://www.npmjs.com/package/@devpranavsharma/react-native-chat-box
- Repository: https://github.com/DevPranavSharma/react-native-chat-box
- Homepage: https://github.com/DevPranavSharma/react-native-chat-box#readme
- Issues: https://github.com/DevPranavSharma/react-native-chat-box/issues
- npm.io page: https://npm.io/package/@devpranavsharma/react-native-chat-box

## Dependencies (2)

- [uuid](https://npm.io/package/uuid.md) ^9.0.1
- [react-native-get-random-values](https://npm.io/package/react-native-get-random-values.md) ^1.9.0

## Alternatives

- [@sindresorhus/slugify](https://npm.io/package/@sindresorhus/slugify.md) — 3.7M weekly downloads
- [solid-js](https://npm.io/package/solid-js.md) — 2.7M weekly downloads
- [expo-glass-effect](https://npm.io/package/expo-glass-effect.md) — 2.5M weekly downloads
- [nanoassert](https://npm.io/package/nanoassert.md) — 780.8K weekly downloads
- [@ffmpeg/ffmpeg](https://npm.io/package/@ffmpeg/ffmpeg.md) — 529.5K weekly downloads

## Recent versions

- 0.1.2 (latest) — 2023-11-06
- 0.1.1 — 2023-11-06
- 0.1.0 — 2023-11-06

## README

# react-native-chat-box

a fully customisable chat component

## Installation

```sh
npm i @devpranavsharma/react-native-chat-box
```

## Usage

```js
import { ChatBox } from 'react-native-chat-box';

// ...

 const [messages, setMessages] = React.useState([
    { text: 'Hey', user: false, id: '123' },
    { text: 'Hey! How are you', user: true, id: '124' },
  ]);
  return (
    <SafeAreaView>
      <ChatBox
        name={'Pranav Sharma'}
        messages={messages}
        onSend={(message) => setMessages([...messages, message])}
      />
    </SafeAreaView>
  );
```

## Props

- **`name`** _(String)_ - Name of the person to show in the header
- **`messages`** _(TMessage[])_ - Messages to display e.g [{ text: 'Hey', user: false, id: '123' }]
- **`onSend`** _(Function)_ - Callback when sending a message
- **`headerColor`** _(ColorValue)_ - value for header background color 
- **`headerTextColor`** _(ColorValue)_ - value for header text color
- **`headerTextStyles`** _(Object)_ - styles for header text
- **`headerStyles`** _(Object)_ - styles for header text
- **`chatBubbleColor`** _(ColorValue)_ - chat bubble color
- **`chatBubbleTextColor`** _(Object)_ - color for bubble text
- **`chatBubbleStyle`** _(Object)_ - styles for chat bubble view
- **`chatBubbleTextStyle`** _(Object)_ - styles for chat bubble text
- **`listScrollProps`** _(Object)_ - props for the FlatList
- **`listScrollStyle`** _(Object)_ - styles for the FlatList
- **`textInputProps`** _(Object)_ - props for the text input
- **`textInputStyle`** _(Object)_ - styles for the text input
- **`sendBtnStyle`** _(Object)_ - styles for the send Button Container
- **`CustomSend`** _(Component)_ - Custom component to replace Send button


## Contributing

See the [contributing guide](CONTRIBUTING.md) to learn how to contribute to the repository and the development workflow.

## License

MIT

---
_Source: https://npm.io/package/@devpranavsharma/react-native-chat-box · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
