{"id":13406345,"url":"https://github.com/matrix-org/matrix-react-sdk","last_synced_at":"2025-10-07T15:31:34.513Z","repository":{"id":33498681,"uuid":"37144575","full_name":"matrix-org/matrix-react-sdk","owner":"matrix-org","description":"Matrix SDK for React Javascript","archived":false,"fork":false,"pushed_at":"2024-04-15T14:08:54.000Z","size":297000,"stargazers_count":1069,"open_issues_count":104,"forks_count":825,"subscribers_count":51,"default_branch":"develop","last_synced_at":"2024-04-15T14:14:57.508Z","etag":null,"topics":["hacktoberfest","matrix","matrix-chat","matrix-sdk"],"latest_commit_sha":null,"homepage":"","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/matrix-org.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null},"funding":{"patreon":"matrixdotorg","liberapay":"matrixdotorg"}},"created_at":"2015-06-09T16:37:07.000Z","updated_at":"2024-07-04T13:40:27.194Z","dependencies_parsed_at":"2023-11-23T14:30:11.914Z","dependency_job_id":"643b8055-0f8b-47a5-a5c7-77e2a595fde5","html_url":"https://github.com/matrix-org/matrix-react-sdk","commit_stats":{"total_commits":32846,"total_committers":937,"mean_commits":35.05442902881537,"dds":0.8750228338306034,"last_synced_commit":"7f32b423c53ecf1eba58840561f9c51a2460a5b7"},"previous_names":[],"tags_count":532,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/matrix-org%2Fmatrix-react-sdk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/matrix-org%2Fmatrix-react-sdk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/matrix-org%2Fmatrix-react-sdk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/matrix-org%2Fmatrix-react-sdk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/matrix-org","download_url":"https://codeload.github.com/matrix-org/matrix-react-sdk/tar.gz/refs/heads/develop","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":219877434,"owners_count":16554893,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["hacktoberfest","matrix","matrix-chat","matrix-sdk"],"created_at":"2024-07-30T19:02:27.771Z","updated_at":"2025-10-07T15:31:31.799Z","avatar_url":"https://github.com/matrix-org.png","language":"TypeScript","funding_links":["https://patreon.com/matrixdotorg","https://liberapay.com/matrixdotorg"],"categories":["TypeScript"],"sub_categories":[],"readme":"[![npm](https://img.shields.io/npm/v/matrix-react-sdk)](https://www.npmjs.com/package/matrix-react-sdk)\n![Tests](https://github.com/matrix-org/matrix-react-sdk/actions/workflows/tests.yml/badge.svg)\n[![Playwright](https://img.shields.io/badge/Playwright-end_to_end_tests-blue)](https://e2e-develop--matrix-react-sdk.netlify.app/)\n![Static Analysis](https://github.com/matrix-org/matrix-react-sdk/actions/workflows/static_analysis.yaml/badge.svg)\n[![Localazy](https://img.shields.io/endpoint?url=https%3A%2F%2Fconnect.localazy.com%2Fstatus%2Felement-web%2Fdata%3Fcontent%3Dall%26title%3Dlocalazy%26logo%3Dtrue)](https://localazy.com/p/element-web)\n[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=matrix-react-sdk\u0026metric=alert_status)](https://sonarcloud.io/summary/new_code?id=matrix-react-sdk)\n[![Coverage](https://sonarcloud.io/api/project_badges/measure?project=matrix-react-sdk\u0026metric=coverage)](https://sonarcloud.io/summary/new_code?id=matrix-react-sdk)\n[![Vulnerabilities](https://sonarcloud.io/api/project_badges/measure?project=matrix-react-sdk\u0026metric=vulnerabilities)](https://sonarcloud.io/summary/new_code?id=matrix-react-sdk)\n[![Bugs](https://sonarcloud.io/api/project_badges/measure?project=matrix-react-sdk\u0026metric=bugs)](https://sonarcloud.io/summary/new_code?id=matrix-react-sdk)\n\n# matrix-react-sdk\n\n## matrix-react-sdk is now actively maintained at [element-hq/matrix-react-sdk](https://github.com/element-hq/matrix-react-sdk)\n\nThis is a react-based SDK for inserting a Matrix chat/voip client into a web page developed from 2015 through 2024 as part of the Matrix.org Foundation.\n\nThis package provides the React components needed to build a Matrix web client using React. It is not usable in isolation, and instead must be used from a 'skin'.\n\nThe only skin that existed during its development was [ vector-im/element-web](https://github.com/element-hq/element-web); it and `matrix-org/matrix-react-sdk` have effectively been considered as a single project (for instance, matrix-react-sdk bugs have been filed against vector-im/element-web rather than this project). For this reason it is now maintained at [element-hq/matrix-react-sdk](https://github.com/element-hq/matrix-react-sdk).\n\nSee the following blog posts for more information:\n\n-   https://matrix.org/blog/2024/08/heart-of-matrix/\n-   https://element.io/blog/sustainable-licensing-at-element-with-agpl/\n\n## Developer Guide\n\nPlatform Targets:\n\n-   Chrome, Firefox and Safari.\n-   WebRTC features (VoIP and Video calling) are only available in Chrome \u0026 Firefox.\n-   Mobile Web is not currently a target platform - instead please use the native\n    iOS (https://github.com/matrix-org/matrix-ios-kit) and Android\n    (https://github.com/matrix-org/matrix-android-sdk2) SDKs.\n\nAll code lands on the `develop` branch - `master` is only used for stable releases.\n**Please file PRs against `develop`!!**\n\nWe use the same contribution guide as Element. Check it out here:\nhttps://github.com/vector-im/element-web/blob/develop/CONTRIBUTING.md\n\nOur code style is also the same as Element's:\nhttps://github.com/vector-im/element-web/blob/develop/code_style.md\n\nCode should be committed as follows:\n\n-   All new components:\n    https://github.com/matrix-org/matrix-react-sdk/tree/master/src/components\n-   Element-specific components:\n    https://github.com/vector-im/element-web/tree/master/src/components\n    -   In practice, `matrix-react-sdk` is still evolving so fast that the\n        maintenance burden of customising and overriding these components for\n        Element can seriously impede development. So right now, there should be\n        very few (if any) customisations for Element.\n-   CSS: https://github.com/matrix-org/matrix-react-sdk/tree/master/res/css\n-   Theme specific CSS \u0026 resources:\n    https://github.com/matrix-org/matrix-react-sdk/tree/master/res/themes\n\nReact components in matrix-react-sdk come in two different flavours:\n'structures' and 'views'. Structures are stateful components which handle the\nmore complicated business logic of the app, delegating their actual presentation\nrendering to stateless 'view' components. For instance, the RoomView component\nthat orchestrates the act of visualising the contents of a given Matrix chat\nroom tracks lots of state for its child components which it passes into them for\nvisual rendering via props.\n\nGood separation between the components is maintained by adopting various best\npractices that anyone working with the SDK needs to be aware of and uphold:\n\n-   Components are named with upper camel case (e.g. views/rooms/EventTile.js)\n\n-   They are organised in a typically two-level hierarchy - first whether the\n    component is a view or a structure, and then a broad functional grouping\n    (e.g. 'rooms' here)\n\n-   The view's CSS file MUST have the same name (e.g. view/rooms/MessageTile.css).\n    CSS for matrix-react-sdk currently resides in\n    https://github.com/matrix-org/matrix-react-sdk/tree/master/res/css.\n\n-   Per-view CSS is optional - it could choose to inherit all its styling from\n    the context of the rest of the app, although this is unusual for any but\n-   Theme specific CSS \u0026 resources:\n    https://github.com/matrix-org/matrix-react-sdk/tree/master/res/themes\n    structural components (lacking presentation logic) and the simplest view\n    components.\n\n-   The view MUST _only_ refer to the CSS rules defined in its own CSS file.\n    'Stealing' styling information from other components (including parents)\n    is not cool, as it breaks the independence of the components.\n\n-   CSS classes are named with an app-specific name-spacing prefix to try to\n    avoid CSS collisions. The base skin shipped by Matrix.org with the\n    matrix-react-sdk uses the naming prefix \"mx*\". A company called Yoyodyne\n    Inc might use a prefix like \"yy*\" for its app-specific classes.\n\n-   CSS classes use upper camel case when they describe React components - e.g.\n    .mx_MessageTile is the selector for the CSS applied to a MessageTile view.\n\n-   CSS classes for DOM elements within a view which aren't components are named\n    by appending a lower camel case identifier to the view's class name - e.g.\n    .mx_MessageTile_randomDiv is how you'd name the class of an arbitrary div\n    within the MessageTile view.\n\n-   We deliberately use vanilla CSS 3.0 to avoid adding any more magic\n    dependencies into the mix than we already have. App developers are welcome\n    to use whatever floats their boat however. In future we'll start using\n    css-next to pull in features like CSS variable support.\n\n-   The CSS for a component can override the rules for child components.\n    For instance, .mx*RoomList .mx_RoomTile {} would be the selector to override\n    styles of RoomTiles when viewed in the context of a RoomList view.\n    Overrides \\_must* be scoped to the View's CSS class - i.e. don't just define\n    .mx_RoomTile {} in RoomList.css - only RoomTile.css is allowed to define its\n    own CSS. Instead, say .mx_RoomList .mx_RoomTile {} to scope the override\n    only to the context of RoomList views. N.B. overrides should be relatively\n    rare as in general CSS inheritance should be enough.\n\n-   Components should render only within the bounding box of their outermost DOM\n    element. Page-absolute positioning and negative CSS margins and similar are\n    generally not cool and stop the component from being reused easily in\n    different places.\n\nOriginally `matrix-react-sdk` followed the Atomic design pattern as per\nhttp://patternlab.io to try to encourage a modular architecture. However, we\nfound that the grouping of components into atoms/molecules/organisms\nmade them harder to find relative to a functional split, and didn't emphasise\nthe distinction between 'structural' and 'view' components, so we backed away\nfrom it.\n\n## Github Issues\n\nAll issues should be filed under https://github.com/vector-im/element-web/issues\nfor now.\n\n## Development\n\nEnsure you have the latest LTS version of Node.js installed.\n\nUsing `yarn` instead of `npm` is recommended. Please see the Yarn 1 [install\nguide](https://classic.yarnpkg.com/docs/install) if you do not have it\nalready. This project has not yet been migrated to Yarn 2, so please ensure\n`yarn --version` shows a version from the 1.x series.\n\n`matrix-react-sdk` depends on\n[`matrix-js-sdk`](https://github.com/matrix-org/matrix-js-sdk). To make use of\nchanges in the latter and to ensure tests run against the develop branch of\n`matrix-js-sdk`, you should set up `matrix-js-sdk`:\n\n```bash\ngit clone https://github.com/matrix-org/matrix-js-sdk\ncd matrix-js-sdk\ngit checkout develop\nyarn link\nyarn install\n```\n\nThen check out `matrix-react-sdk` and pull in dependencies:\n\n```bash\ngit clone https://github.com/matrix-org/matrix-react-sdk\ncd matrix-react-sdk\ngit checkout develop\nyarn link matrix-js-sdk\nyarn install\n```\n\nSee the [help for `yarn link`](https://classic.yarnpkg.com/docs/cli/link) for\nmore details about this.\n\n### Running tests\n\nEnsure you've followed the above development instructions and then:\n\n```bash\nyarn test\n```\n\n### Running lint\n\nTo check your code complies with the project style, ensure you've followed the\nabove development instructions and then:\n\n```bash\nyarn lint\n```\n\n### Dependency problems\n\nIf you see errors (particularly \"Cannot find module\") running the lint or test\ncommands, and `yarn install` doesn't fix them, it may be because\nyarn is not fetching git dependencies eagerly enough.\n\nTry running this:\n\n```bash\nyarn cache clean \u0026\u0026 yarn install --force\n```\n\nNow the yarn commands should work as normal.\n\n### End-to-End tests\n\nWe use Playwright and Element Web for end-to-end tests. See\n[`docs/playwright.md`](docs/playwright.md) for more information.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmatrix-org%2Fmatrix-react-sdk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmatrix-org%2Fmatrix-react-sdk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmatrix-org%2Fmatrix-react-sdk/lists"}