{"id":31783552,"url":"https://github.com/ably/ably-chat-react-ui-kit","last_synced_at":"2026-02-17T06:03:43.309Z","repository":{"id":304989394,"uuid":"987108353","full_name":"ably/ably-chat-react-ui-kit","owner":"ably","description":"Ably Chat React UI Components","archived":false,"fork":false,"pushed_at":"2026-02-04T11:19:51.000Z","size":5183,"stargazers_count":2,"open_issues_count":8,"forks_count":1,"subscribers_count":5,"default_branch":"main","last_synced_at":"2026-02-04T22:12:46.614Z","etag":null,"topics":["ably","ably-chat","chat","chat-api","reactjs","ui-components","ui-kit"],"latest_commit_sha":null,"homepage":"https://ably.com/chat","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ably.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":"MAINTAINERS.md","copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-05-20T15:29:51.000Z","updated_at":"2025-10-30T13:12:00.000Z","dependencies_parsed_at":"2025-07-17T20:42:07.412Z","dependency_job_id":"245c6d81-a5af-4e02-8888-715bc186cc1a","html_url":"https://github.com/ably/ably-chat-react-ui-kit","commit_stats":null,"previous_names":["ably/ably-chat-react-ui-components","ably/ably-chat-react-ui-kit"],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/ably/ably-chat-react-ui-kit","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ably%2Fably-chat-react-ui-kit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ably%2Fably-chat-react-ui-kit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ably%2Fably-chat-react-ui-kit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ably%2Fably-chat-react-ui-kit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ably","download_url":"https://codeload.github.com/ably/ably-chat-react-ui-kit/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ably%2Fably-chat-react-ui-kit/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29535934,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-17T05:00:25.817Z","status":"ssl_error","status_checked_at":"2026-02-17T04:57:16.126Z","response_time":100,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ably","ably-chat","chat","chat-api","reactjs","ui-components","ui-kit"],"created_at":"2025-10-10T10:34:35.686Z","updated_at":"2026-02-17T06:03:43.302Z","avatar_url":"https://github.com/ably.png","language":"TypeScript","readme":"![Ably Chat Header](images/Chat-UI-Kits-github-v1.1.png)\n\n# Ably Chat React UI Kit\n\nA library of configurable UI components for building chat applications with the Ably Chat SDK. This package provides\nready-to-use React components that integrate seamlessly with [`@ably/chat`](https://github.com/ably/ably-chat-js) to\nhandle real-time messaging, presence, typing indicators, and more.\n\n## Getting started\n\nEverything you need to get started with Ably Chat React UI Kit:\n\n* [About Ably Chat.](https://ably.com/docs/chat)\n* [Getting started with Ably Chat in JavaScript.](https://ably.com/docs/chat/getting-started/javascript)\n* [Getting started with Ably Chat in React.](https://ably.com/docs/chat/getting-started/react)\n* [Getting started with Ably Chat React UI Kit.](https://ably.com/docs/chat/getting-started/react-ui-kit)\n* [SDK and usage docs in JavaScript.](https://ably.com/docs/chat/setup?lang=javascript)\n* [SDK and usage docs in React.](https://ably.com/docs/chat/setup?lang=react)\n* [SDK and usage docs for React UI kit.](https://ably.com/docs/chat/react-ui-kit/setup)\n* [API documentation (JavaScript).](https://sdk.ably.com/builds/ably/ably-chat-js/main/typedoc/modules/chat-js.html)\n* [API documentation (React Hooks).](https://sdk.ably.com/builds/ably/ably-chat-js/main/typedoc/modules/chat-react.html)\n* [API documentation (React UI kit).](https://sdk.ably.com/builds/ably/ably-chat-react-ui-kit/main/storybook/)\n* [Chat Example App.](https://github.com/ably/ably-chat-js/tree/main/demo)\n* [Chat Example App using Ably Chat React UI Kit.](https://github.com/ably/ably-chat-react-ui-kit/tree/main/examples/group-chat)\n* Play with the [livestream chat demo.](https://ably-livestream-chat-demo.vercel.app/)\n\n### Installation\n\n```bash\nnpm install @ably/chat-react-ui-kit @ably/chat ably react react-dom\n```\n\n## Supported Platforms\n\nThis SDK supports the following platforms:\n\n| Platform     | Support                                                                                                    |\n|--------------|------------------------------------------------------------------------------------------------------------|\n| Browsers     | All major desktop browsers, including Chrome, Firefox, Edge and Opera. Internet Explorer is not supported. |\n| Node.js      | Version 20 or newer.                                                                                       |\n| TypeScript   | Fully supported, the library is written in TypeScript.                                                     |\n| React        | Version 18 or newer. Includes providers and hooks for deep integration with the React ecosystem.           |\n\n\u003e [!NOTE] The Chat UI Components SDK can be installed from NPM and requires the core Ably Chat SDK as a peer dependency.\n\u003e\n\n## Core Components\n\n### App Component\n\nFull application component that provides a complete chat interface out of the box:\n- Integrated sidebar for room navigation\n- Chat area with message display and input\n- Theme support (light/dark mode)\n- Avatar management\n\n### ChatWindow\nA comprehensive chat interface for individual rooms featuring:\n- Message history with pagination\n- Real-time message display\n- Message editing and deletion\n- Reactions support\n- Typing indicators\n\n### Sidebar\nA collapsible navigation component for managing multiple chat rooms:\n- Room list with activity indicators\n- Room creation and management\n- Presence and occupancy display\n- Theme toggle integration\n\n## Usage\n\nThe following example demonstrates how to set up a complete chat application using the core components. This includes initializing the Ably client, wrapping your app with the required providers, and rendering the `App` component with a sidebar and chat window:\n\n```tsx\nimport * as Ably from 'ably';\nimport { ChatClient } from '@ably/chat';\nimport { ChatClientProvider } from '@ably/chat/react';\nimport {\n  App,\n  ThemeProvider,\n  AvatarProvider,\n  ChatSettingsProvider,\n} from '@ably/chat-react-ui-kit';\n\n// Don't forget to import the styles\nimport '@ably/chat-react-ui-kit/dist/style.css';\n\n// Initialize Ably Realtime client with your API key and a unique client ID\nconst ablyClient = new Ably.Realtime({\n  key: '\u003cyour-ably-api-key\u003e',\n  clientId: 'user-' + Math.random().toString(36).slice(2, 9),\n});\n\n// Create a Chat client using the Ably Realtime client\nconst chatClient = new ChatClient(ablyClient);\n\nfunction MyApp() {\n  return (\n    // ThemeProvider: Enables light/dark mode theming with optional persistence\n    \u003cThemeProvider options={{ persist: true, defaultTheme: 'light' }}\u003e\n      {/* AvatarProvider: Manages user avatar state across the application */}\n      \u003cAvatarProvider\u003e\n        {/* ChatSettingsProvider: Provides chat configuration context */}\n        \u003cChatSettingsProvider\u003e\n          {/* ChatClientProvider: Makes the chat client available to all child components */}\n          \u003cChatClientProvider client={chatClient}\u003e\n            {/*\n              App: The main chat application component\n              - Renders a Sidebar for room navigation (create, select, leave rooms)\n              - Renders a ChatWindow for the active room with messages, typing indicators, and reactions\n              - initialRoomNames: Pre-populate the sidebar with these room names\n            */}\n            \u003cApp initialRoomNames={['general', 'random']} /\u003e\n          \u003c/ChatClientProvider\u003e\n        \u003c/ChatSettingsProvider\u003e\n      \u003c/AvatarProvider\u003e\n    \u003c/ThemeProvider\u003e\n  );\n}\n```\n\n### Using Individual Components\n\nFor more control, you can use `ChatWindow` and `Sidebar` independently:\n\n```tsx\nimport { useState } from 'react';\nimport { ChatRoomProvider } from '@ably/chat/react';\nimport {\n  ChatWindow,\n  Sidebar,\n  ThemeProvider,\n} from '@ably/chat-react-ui-kit';\n\n// Assumes ChatClientProvider is already set up in a parent component\n\nfunction CustomChatApp() {\n  const [rooms, setRooms] = useState\u003cstring[]\u003e(['general']);\n  const [activeRoom, setActiveRoom] = useState\u003cstring | undefined\u003e('general');\n\n  const addRoom = (name: string) =\u003e {\n    setRooms((prev) =\u003e (prev.includes(name) ? prev : [...prev, name]));\n    setActiveRoom(name);\n  };\n\n  const leaveRoom = (name: string) =\u003e {\n    setRooms((prev) =\u003e {\n      const next = prev.filter((r) =\u003e r !== name);\n      // Update active room based on the new list to avoid stale state\n      if (next.length === 0) {\n        setActiveRoom(undefined);\n      } else if (name === activeRoom) {\n        setActiveRoom(next[0]);\n      }\n      return next;\n    });\n  };\n\n  return (\n    \u003cThemeProvider\u003e\n      \u003cdiv className=\"flex h-screen\"\u003e\n        {/* Sidebar: Manages room list, creation, and selection */}\n        \u003cSidebar\n          roomNames={rooms}\n          activeRoomName={activeRoom}\n          addRoom={addRoom}\n          setActiveRoom={setActiveRoom}\n          leaveRoom={leaveRoom}\n        /\u003e\n\n        {/* ChatWindow: Displays messages, input, typing indicators for the active room */}\n        {activeRoom \u0026\u0026 (\n          \u003cChatRoomProvider key={activeRoom} name={activeRoom}\u003e\n            \u003cChatWindow\n              roomName={activeRoom}\n              enableTypingIndicators={true}\n            /\u003e\n          \u003c/ChatRoomProvider\u003e\n        )}\n      \u003c/div\u003e\n    \u003c/ThemeProvider\u003e\n  );\n}\n```\n\n## Releases\n\nThe [CHANGELOG.md](./CHANGELOG.md) contains details of the latest releases for this SDK. You can also view all Ably releases on [changelog.ably.com](https://changelog.ably.com).\n\n## Contribute\n\nRead the [MAINTAINERS.md](./MAINTAINERS.md) guidelines to contribute to Ably or [Share feedback or request](https://forms.gle/mBw9M53NYuCBLFpMA) a new feature.\n\n## Support and known issues\n\nFor help or technical support, visit Ably's [support page](https://ably.com/support). You can also view the [community reported Github issues](https://github.com/ably/ably-chat-react-ui-kit/issues) or raise one yourself.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fably%2Fably-chat-react-ui-kit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fably%2Fably-chat-react-ui-kit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fably%2Fably-chat-react-ui-kit/lists"}