# @microsoft/signalr

> ASP.NET Core SignalR Client

Latest version **10.0.11** (published 2026-08-04) · MIT license · 0 weekly downloads

## Install

```sh
npm install @microsoft/signalr
pnpm add @microsoft/signalr
yarn add @microsoft/signalr
bun add @microsoft/signalr
```

## Health

**Score 70/100 (B)** — status: active.

Positive: has types; esm support; no vulnerabilities; recently updated; high maintenance score; popular repo.

Warnings: low downloads.

## Facts

| | |
|---|---|
| Version | 10.0.11 |
| Published | 2026-08-04 |
| First published | 2019-06-05 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 5 |
| Unpacked size | 2.7 MB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 38441 |
| Author | Microsoft |
| Maintainers | microsoft1es, microsoft-oss-releases, brecon, mkartak |
| Keywords | signalr, aspnetcore |

## Links

- npm: https://www.npmjs.com/package/@microsoft/signalr
- Repository: https://github.com/dotnet/aspnetcore
- Homepage: https://github.com/dotnet/aspnetcore/tree/main/src/SignalR#readme
- Issues: https://github.com/dotnet/aspnetcore/issues
- npm.io page: https://npm.io/package/@microsoft/signalr

## Dependencies (5)

- [ws](https://npm.io/package/ws.md) ^7.5.10
- [node-fetch](https://npm.io/package/node-fetch.md) ^2.6.7
- [eventsource](https://npm.io/package/eventsource.md) ^2.0.2
- [fetch-cookie](https://npm.io/package/fetch-cookie.md) ^2.0.3
- [abort-controller](https://npm.io/package/abort-controller.md) ^3.0.0

## Recent versions

- 10.0.11 (latest) — 2026-08-04
- 11.0.0-preview.7.26381.103 (next) — 2026-08-04
- 9.0.19 (9.0.x) — 2026-08-03
- 8.0.29 (8.0.x) — 2026-08-03
- 10.0.0 — 2025-11-14
- 9.0.6 — 2025-07-31
- 8.0.17 — 2025-07-31
- 8.0.7 — 2024-07-09
- 8.0.0 — 2023-11-14
- 7.0.14 — 2023-11-14
- 6.0.25 — 2023-11-14
- 8.0.0-rc.2.23480.2 — 2023-10-10
- 7.0.12 — 2023-10-10
- 6.0.23 — 2023-10-10
- 8.0.0-rc.1.23421.29 — 2023-09-12
- … 124 more at https://npm.io/package/@microsoft/signalr/versions

## README

JavaScript and TypeScript clients for SignalR for ASP.NET Core and Azure SignalR Service

## Installation

```bash
npm install @microsoft/signalr
# or
yarn add @microsoft/signalr
```

To try previews of the next version, use the `next` tag on NPM:

```bash
npm install @microsoft/signalr@next
# or
yarn add @microsoft/signalr@next
```

## Usage

See the [SignalR Documentation](https://learn.microsoft.com/aspnet/core/signalr) at learn.microsoft.com for documentation on the latest release. [API Reference Documentation](https://learn.microsoft.com/javascript/api/%40aspnet/signalr/?view=signalr-js-latest) is also available on learn.microsoft.com.

For documentation on using this client with Azure SignalR Service and Azure Functions, see the [SignalR Service serverless developer guide](https://learn.microsoft.com/azure/azure-signalr/signalr-concept-serverless-development-config).

### Browser

To use the client in a browser, copy `*.js` files from the `dist/browser` folder to your script folder include on your page using the `<script>` tag.

### WebWorker

To use the client in a webworker, copy `*.js` files from the `dist/webworker` folder to your script folder include on your webworker using the `importScripts` function. Note that webworker SignalR hub connection supports only absolute path to a SignalR hub.

### Node.js

To use the client in a NodeJS application, install the package to your `node_modules` folder and use `require('@microsoft/signalr')` to load the module. The object returned by `require('@microsoft/signalr')` has the same members as the global `signalR` object (when used in a browser).

### Example (Browser)

```javascript
let connection = new signalR.HubConnectionBuilder()
    .withUrl("/chat")
    .build();

connection.on("send", data => {
    console.log(data);
});

connection.start()
    .then(() => connection.invoke("send", "Hello"));
```

### Example (WebWorker)

```javascript
importScripts('signalr.js');

let connection = new signalR.HubConnectionBuilder()
    .withUrl("https://example.com/signalr/chat")
    .build();

connection.on("send", data => {
    console.log(data);
});

connection.start()
    .then(() => connection.invoke("send", "Hello"));

```

### Example (NodeJS)

```javascript
const signalR = require("@microsoft/signalr");

let connection = new signalR.HubConnectionBuilder()
    .withUrl("/chat")
    .build();

connection.on("send", data => {
    console.log(data);
});

connection.start()
    .then(() => connection.invoke("send", "Hello"));
```

---
_Source: https://npm.io/package/@microsoft/signalr · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
