# @leafygreen-ui/banner

> leafyGreen UI Kit Banner

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

## Install

```sh
npm install @leafygreen-ui/banner
pnpm add @leafygreen-ui/banner
yarn add @leafygreen-ui/banner
bun add @leafygreen-ui/banner
```

## 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 | 10.2.6 |
| Published | 2026-10-02 |
| First published | 2020-05-27 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 7 |
| Unpacked size | 179.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Provenance | attested (GitHub Actions) |
| GitHub stars | 274 |
| Maintainers | thesonofthomp, shaneeza, stephl3, aitchpgm, hnevins, _tsck |

## Links

- npm: https://www.npmjs.com/package/@leafygreen-ui/banner
- Repository: https://github.com/mongodb/leafygreen-ui
- Homepage: https://github.com/mongodb/leafygreen-ui/tree/main/packages/banner
- Issues: https://jira.mongodb.org/projects/PD/summary
- npm.io page: https://npm.io/package/@leafygreen-ui/banner

## Dependencies (7)

- [@leafygreen-ui/lib](https://npm.io/package/@leafygreen-ui/lib.md) ^15.7.1
- [@leafygreen-ui/icon](https://npm.io/package/@leafygreen-ui/icon.md) ^14.9.1
- [@leafygreen-ui/tokens](https://npm.io/package/@leafygreen-ui/tokens.md) ^4.2.3
- [@leafygreen-ui/emotion](https://npm.io/package/@leafygreen-ui/emotion.md) ^5.2.1
- [@leafygreen-ui/palette](https://npm.io/package/@leafygreen-ui/palette.md) ^5.0.3
- [@leafygreen-ui/typography](https://npm.io/package/@leafygreen-ui/typography.md) ^22.2.5
- [@leafygreen-ui/icon-button](https://npm.io/package/@leafygreen-ui/icon-button.md) ^17.1.6

## Recent versions

- 10.2.6 (latest) — 2026-10-02
- 7.0.10 (beta) — 2023-07-26
- 8.0.0-alpha.1 (alpha) — 2023-07-20
- 7.0.8-next.7 (next) — 2023-05-26
- 5.0.1-test.0 (test) — 2022-09-22
- 10.2.5 — 2026-01-21
- 10.2.4 — 2025-11-24
- 10.2.3 — 2025-11-13
- 10.2.2 — 2025-10-31
- 10.2.1 — 2025-10-21
- 10.2.0 — 2025-10-14
- 10.1.1 — 2025-09-25
- 10.1.0 — 2025-09-10
- 10.0.5 — 2025-09-03
- 10.0.4 — 2025-07-28
- … 76 more at https://npm.io/package/@leafygreen-ui/banner/versions

## README

# Banner

![npm (scoped)](https://img.shields.io/npm/v/@leafygreen-ui/banner.svg)

#### [View on MongoDB.design](https://www.mongodb.design/component/banner/live-example/)

## Installation

### PNPM

```shell
pnpm add @leafygreen-ui/banner
```

### Yarn

```shell
yarn add @leafygreen-ui/banner
```

### NPM

```shell
npm install @leafygreen-ui/banner
```

## Example

```js
<Banner>This is the banner content</Banner>
```

## Properties

| Prop           | Type                                           | Description                                                           | Default    |
| -------------- | ---------------------------------------------- | --------------------------------------------------------------------- | ---------- |
| `variant`      | `'info'`, `'warning'`, `'danger'`, `'success'` | Sets the variant for the Banner                                       | `'info'`   |
| `dismissible`  | `boolean`                                      | Determines whether or not the Banner is dismissible                   | `false`    |
| `onClose`      | `React.MouseEventHandler`                      | Callback fired when dismiss button is clicked                         | `() => {}` |
| `image`        | `React.ReactElement`                           | Illustration that will replace default Icon when the prop is supplied |            |
| `baseFontSize` | `13`, `16`                                     | Determines `font-size` for body copy in Callout component             | `13`       |
| `darkMode`     | `boolean`                                      | Determines if the component renders in dark theme                     | `false`    |
| ...            | native `div` attributes                        | Any other props will be spread on the root `div` element              |            |

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