Skip to content

CorieW/react-actions-chat

Repository files navigation

React Actions Chat

codecov

Interactive React chat UI for support flows, guided actions, confirmations, and user input collection.

Installation

npm install react-actions-chat

This package targets Node.js 22.13.0+.

If you want query-driven or vector-search-backed action recommendations, install the companion package too:

npm install react-actions-chat react-actions-chat-recommended-actions

Quick Start

import { Chat } from 'react-actions-chat';
import 'react-actions-chat/styles';

export function App() {
  return (
    <Chat
      initialMessages={[
        {
          type: 'other',
          content: 'Hello! How can I help you today?',
        },
      ]}
    />
  );
}

Documentation

Read the published documentation site:

If you're contributing to this repo, the docs source lives in docs.

Examples

Runnable workspace examples live in examples:

  • qa-bot: basic support assistant flow
  • login: input and confirmation flows
  • settings: companion recommended-actions package with a real OpenAI embedder

Live demos:

Start one from the repo root after pnpm install:

pnpm --filter qa-bot-example dev
pnpm --filter login-example dev
pnpm --filter settings-example dev

Development

Use Node.js 22.13.0 or newer with pnpm.

corepack enable
pnpm install
pnpm build

Useful scripts:

  • pnpm test
  • pnpm test:coverage
  • pnpm typecheck
  • pnpm lint
  • pnpm changeset
  • pnpm version-packages
  • pnpm docs:dev
  • pnpm docs:build
  • pnpm pages:build
  • pnpm run refresh:all

When a pull request changes a published package, add a changeset with pnpm changeset unless the PR is intentionally marked with the no-changeset label. Merging changesets to main opens or updates a release PR, and merging that release PR publishes to npm when the repo has an NPM_TOKEN secret configured.

License

This project is licensed under the MIT License. See LICENSE.

About

A React library for building action-driven chat interfaces.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors