| Name | Modified | Size | Downloads / Week |
|---|---|---|---|
| Parent folder | |||
| README.md | 2026-09-27 | 2.1 kB | |
| v1.0.0 source code.tar.gz | 2026-09-27 | 89.4 kB | |
| v1.0.0 source code.zip | 2026-09-27 | 121.8 kB | |
| Totals: 3 Items | 213.3 kB | 3 | |
React Simple Chatbot is now written in TypeScript with React function components and hooks, and supports React 18 and 19 (#394).
Install
:::bash
npm install react-simple-chatbot styled-components
Works with React 18 or 19 and styled-components 5.1 or newer. The types are included.
Breaking changes
| Change | Migration |
|---|---|
| Peer dependencies: React >= 18 and styled-components >= 5.1 (were React >= 16.3 and styled-components >= 4) | Upgrade React and styled-components, or stay on 0.7.0 |
ChatBot is a function component, so a ref no longer returns a component instance |
Control it with props instead (e.g. opened + toggleFloating, or a new key to restart the conversation) |
Enter submits on keydown instead of the deprecated keypress, and is ignored while composing IME characters |
Code listening to keypress on the input should use keydown |
handleEnd receives steps as an object keyed by step id, instead of an array with string keys |
Nothing if you read steps.someId; replace array methods with Object.values(steps) |
New
- Written in TypeScript. The type declarations are generated from the source, and the step, props and custom component types are exported (
Step,ChatBotProps,CustomComponentProps,ChatBotTheme...) - ES module build (
modulefield) next to the UMD bundle - A partial theme falls back to the default theme for the missing keys
Bug fixes
- Props used only for styling (
width,height,opened...) are no longer passed to the DOM - A DOM element used as
extraControl(e.g.<button />) no longer produces React warnings
Security
- Resolves all open Dependabot alerts (
serialize-javascript,js-yaml,uuid,@tootallnate/once), which came from the old dev dependencies
Packaging
- Removes the
prop-typesandrandom-iddependencies - Built with Vite, tested with Vitest and Testing Library, and end-to-end in Chromium, Firefox and WebKit
Full Changelog: https://github.com/LucasBassetti/react-simple-chatbot/compare/v0.7.0...v1.0.0