# @lg-chat/leafygreen-chat-provider

> lg-chat LeafyGreen Chat Context

Latest version **6.0.1** (published 2026-10-02) · Apache-2.0 license · 0 weekly downloads

## Install

```sh
npm install @lg-chat/leafygreen-chat-provider
pnpm add @lg-chat/leafygreen-chat-provider
yarn add @lg-chat/leafygreen-chat-provider
bun add @lg-chat/leafygreen-chat-provider
```

## Health

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

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

Warnings: low downloads.

## Facts

| | |
|---|---|
| Version | 6.0.1 |
| Published | 2026-10-02 |
| First published | 2024-03-14 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 25.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Provenance | attested (GitHub Actions) |
| GitHub stars | 274 |
| Maintainers | aitchpgm, stephl3, thesonofthomp, _tsck, shaneeza |

## Links

- npm: https://www.npmjs.com/package/@lg-chat/leafygreen-chat-provider
- Repository: https://github.com/mongodb/leafygreen-ui
- Homepage: https://github.com/mongodb/leafygreen-ui/tree/main/chat/leafygreen-chat-provider
- Issues: https://jira.mongodb.org/projects/LG/summary
- npm.io page: https://npm.io/package/@lg-chat/leafygreen-chat-provider

## Recent versions

- 6.0.1 (latest) — 2026-10-02
- 6.0.0 — 2025-11-13
- 5.1.0 — 2025-10-21
- 5.0.2 — 2025-09-10
- 5.0.1 — 2025-09-03
- 5.0.0 — 2025-08-15
- 4.1.0 — 2025-07-18
- 4.0.0 — 2025-05-29
- 3.0.2 — 2025-03-03
- 3.0.1 — 2025-01-21
- 3.0.0 — 2025-01-09
- 2.0.0 — 2024-03-14

## README

# LeafyGreen Chat Provider

## Installation

### PNPM

```shell
pnpm add @lg-chat/leafygreen-chat-provider
```

### Yarn

```shell
yarn add @lg-chat/leafygreen-chat-provider
```

### NPM

```shell
npm install @lg-chat/leafygreen-chat-provider
```

## Overview

`LeafyGreenChatProvider` provides context to LG Chat components, including the assistant name that will be displayed in messages.

## Examples

### LeafyGreenChatProvider

```tsx
import { LeafyGreenChatProvider } from '@lg-chat/leafygreen-chat-provider';

function App() {
  return (
    <LeafyGreenChatProvider assistantName="MongoDB Assistant">
      {/* chat components */}
    </LeafyGreenChatProvider>
  );
}
```

### With Custom Assistant Name

```tsx
import { LeafyGreenChatProvider } from '@lg-chat/leafygreen-chat-provider';

function App() {
  return (
    <LeafyGreenChatProvider assistantName="MongoDB Assistant">
      {/* chat components */}
    </LeafyGreenChatProvider>
  );
}
```

## Properties

| Prop                         | Type        | Description                                                                         | Default               |
| ---------------------------- | ----------- | ----------------------------------------------------------------------------------- | --------------------- |
| `assistantName` _(optional)_ | `string`    | The name of the AI assistant that will be displayed when AI sends messages to users | `'MongoDB Assistant'` |
| `children`                   | `ReactNode` | The chat components to be wrapped by the provider                                   |                       |

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