A modern, production-ready React Native chat application powered by react-native-ds-chat β a fully customizable, TypeScript-first chat UI library built from the ground up.
- Real-time chat interface with smooth message animations
- Custom message bubbles with gradient highlights and shadows
- Custom input toolbar with attachment button and animated send button
- Message status indicators (sending, sent, delivered, read, failed)
- Image attachment support
- Safe area handling for modern devices
- Full chat UI with message bubbles, avatars, timestamps & status indicators
- Optimized
FlatList-based rendering with memoization - Typing indicator with animated dots
- Day separators with smart date formatting (Today, Yesterday, weekday names)
- Load earlier messages (infinite scroll)
- Keyboard-aware layout with platform-specific handling
- Complete theming system with light & dark themes
- Every component is customizable via render props
- Strict TypeScript types throughout
- Zero heavy external dependencies
| Layer | Technology |
|---|---|
| Framework | React Native 0.81.5 |
| Platform | Expo SDK 54 |
| Language | TypeScript 5.9 |
| React | React 19.1 |
| Architecture | New Architecture enabled |
| Chat UI Library | react-native-ds-chat |
| Build Tool | react-native-builder-bob |
dsChat/
βββ App.js # Default Expo entry (not used as root)
βββ index.js # App entry point β registers ChatScreen
βββ app.json # Expo configuration
βββ package.json # Root dependencies & scripts
βββ tsconfig.json # TypeScript configuration
β
βββ src/
β βββ Screens/
β βββ ChatScreen.tsx # Main chat screen with custom components
β
βββ rn-DS-chat-UI/ # Chat UI library (local package)
β βββ src/
β β βββ index.ts # Library entry point & exports
β β βββ types.ts # TypeScript type definitions
β β βββ theme.ts # Light/Dark theme system
β β βββ components/
β β β βββ Chat.tsx # Main Chat orchestrator
β β β βββ MessageList.tsx # Virtualized message list
β β β βββ MessageRow.tsx # Individual message row layout
β β β βββ MessageBubble.tsx # Message bubble component
β β β βββ InputToolbar.tsx # Input toolbar with send button
β β β βββ SendButton.tsx # Animated send button
β β β βββ Avatar.tsx # User avatar component
β β β βββ DaySeparator.tsx # Day header separator
β β β βββ TypingIndicator.tsx # Animated typing dots
β β β βββ LoadEarlier.tsx # Load more messages button
β β β βββ SystemMessage.tsx # System message display
β β βββ hooks/
β β β βββ useAnimatedMessage.ts
β β β βββ useKeyboardHeight.ts
β β βββ utils/
β β βββ dateUtils.ts # Date formatting helpers
β β βββ messageUtils.ts # Message creation helpers
β β βββ scaling.ts # Responsive scaling utilities
β β βββ index.ts
β βββ package.json
β βββ README.md # Library-specific documentation
β
βββ assets/ # App icons, splash screens
βββ android/ # Android native project
βββ ios/ # iOS native project
- Node.js β₯ 18
- npm or yarn
- Expo CLI (
npx expo) - Xcode (for iOS) / Android Studio (for Android)
-
Clone the repository
git clone <repository-url> cd dsChat
-
Install dependencies
npm install # or yarn install -
Install iOS pods (macOS only)
cd ios && pod install && cd ..
# Start Expo dev server
npm start
# Run on iOS
npm run ios
# Run on Android
npm run android
# Run on Web
npm run webThe app ships with a custom CustomMessageBubble component featuring:
- Distinct sent/received bubble shapes with asymmetric border radii
- Subtle gradient highlight overlay on sent bubbles
- Platform-specific shadow effects (iOS shadow / Android elevation)
- Status icon indicators (β, ββ, β )
<Chat
renderBubble={(props) => <CustomMessageBubble {...props} />}
...
/>A custom CustomInputToolbar component is included with:
- Attachment (plus) button
- Auto-expanding multiline input field
- Animated send button with spring press feedback
- Send button appears only when text is entered
<Chat
renderInputToolbar={(props) => <CustomInputToolbar {...props} />}
...
/>The library supports complete theming with built-in light and dark themes:
import { Chat, DARK_THEME } from 'react-native-ds-chat';
// Built-in dark theme
<Chat theme={DARK_THEME} ... />
// Custom theme overrides
<Chat
theme={{
colors: {
primary: '#FF6B6B',
sentBubble: '#FF6B6B',
background: '#1A1A2E',
},
}}
...
/>The react-native-ds-chat library is published on npm. Install it with:
npm install react-native-ds-chatimport { Chat, Message } from "react-native-ds-chat";
const ChatScreen = () => {
const [messages, setMessages] = useState<Message[]>([]);
const currentUser = { _id: "1", name: "You" };
const onSend = useCallback((newMessages: Message[]) => {
setMessages((prev) => [...newMessages, ...prev]);
}, []);
return (
<Chat
messages={messages}
user={currentUser}
onSend={onSend}
placeholder="Type a message..."
showReceiverAvatar
/>
);
};All components are individually exported and can be used standalone:
import {
MessageBubble,
Avatar,
InputToolbar,
SendButton,
TypingIndicator,
DaySeparator,
} from "react-native-ds-chat";import {
createMessage,
formatTime,
formatDayHeader,
isSameDay,
isToday,
moderateScale,
} from "react-native-ds-chat";π For complete library documentation, see
rn-DS-chat-UI/README.md
| Script | Description |
|---|---|
npm start |
Start Expo dev server |
npm run ios |
Run on iOS simulator |
npm run android |
Run on Android emulator |
npm run web |
Start web version |
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License.