Skip to content

[Feat] Add EuiBanner component - #9673

Merged
mgadewoll merged 16 commits into
elastic:mainfrom
mgadewoll:feat/banner-component
May 27, 2026
Merged

mgadewoll merged 16 commits into
elastic:mainfrom
mgadewoll:feat/banner-component

Conversation

@mgadewoll

@mgadewoll mgadewoll commented May 21, 2026 •

Copy link
Copy Markdown
Contributor

Summary

This PR adds a new EuiBanner component.
This component is based on the previous Kibana custom implementation of AnnouncementBanner (PR)

Screenshot 2026-05-21 at 15 36 14

API Changes

prop required type default value description
title required string - Banner title
text - ReactNode - Banner body text. Avoid using for complex non-text content.
media required ReactNode - Illustration slot. Use to pass in an image or svg.
size - s | m - Defines the banner sizing and adjusts breakpoint behavior
color - highlighted | plain highlighted Defines the banner color variant.
actionProps - { primary: EuiBannerActionPrimaryProps, secondary: EuiBannerActionSecondaryProps } undefined Use to render action buttons. Standalone secondary buttons are not supported.
onDismiss - () => void undefined If provided, a dismiss button will be rendered.
dismissButtonProps - EuiButtonIconProps undefined Props to pass to the dismiss EuiButtonIcon
headingElement - h2 | h3 | h4 | h5 | h6 h2 Defines the rendered heading DOM element for the title
announceOnMount - boolean false When set to true, the content is announced by screen readers on mount.

Screenshots

size light dark
m Screenshot 2026-05-21 at 15 24 13 Screenshot 2026-05-21 at 15 24 17
s Screenshot 2026-05-21 at 15 25 35 Screenshot 2026-05-21 at 15 25 42

Impact Assessment

Note: Most PRs should be tested in Kibana to help gauge their Impact before merging.

  • 🔴 Breaking changes — What will break? How many usages in Kibana/Cloud UI are impacted?
  • 💅 Visual changes — May impact style overrides; could require visual testing. Explain and estimate impact.
  • 🧪 Test impact — May break functional or snapshot tests (e.g., HTML structure, class names, default values).
  • 🔧 Hard to integrate — If changes require substantial updates to Kibana, please stage the changes and link them here.

Impact level: 🟢 None
This is a new component that's not used so far.

ℹ️ Kibana is using the custom AnnouncementBanner component, which we should update to return EuiBanner instead. (Kibana CI was run with the pre-prepared update in this build)

Release Readiness

  • Documentation: EuiBanner
  • Figma: Banner specs
  • Migration guide: {steps or link, for breaking/visual changes or deprecations}
  • Adoption plan (new features): {link to issue/doc or outline who will integrate this and where}

QA instructions for reviewer

💻 EuiBanner storybook

  • verify EuiBanner matches design specs
  • verify EuiBanner props work as expected

Checklist before marking Ready for Review

Reviewer checklist

  • Approved Impact Assessment — Acceptable to merge given the consumer impact.
  • Approved Release Readiness — Docs, Figma, and migration info are sufficient to ship.

@mgadewoll mgadewoll self-assigned this May 21, 2026
@mgadewoll
mgadewoll force-pushed the feat/banner-component branch from 69eee87 to d73c61e Compare May 21, 2026 13:51
@mgadewoll
mgadewoll requested a review from ek-so May 21, 2026 15:15
@mgadewoll
mgadewoll requested a review from acstll May 21, 2026 15:32
@mgadewoll
mgadewoll marked this pull request as ready for review May 21, 2026 15:32
@mgadewoll
mgadewoll requested a review from a team as a code owner May 21, 2026 15:32
Copilot AI review requested due to automatic review settings May 21, 2026 15:32

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a new EuiBanner announcement component to EUI, along with Storybook/docs coverage and i18n token wiring, to support full-width promotional/informational messaging similar to Kibana’s prior AnnouncementBanner.

Changes:

  • Introduces EuiBanner component implementation, styles, Storybook stories, and RTL unit tests
  • Adds new docs page for Banner and exposes the component via the public components index
  • Updates i18n tokens and adds a changelog entry

Reviewed changes

Copilot reviewed 8 out of 17 changed files in this pull request and generated 7 comments.

Show a summary per file
File Description
packages/website/docs/components/display/banner.mdx Adds EuiBanner documentation, usage examples, and prop table
packages/eui/src/components/index.ts Exports the new banner component entry point
packages/eui/src/components/banner/index.ts Public export surface for EuiBanner and its props
packages/eui/src/components/banner/banner.tsx Implements EuiBanner UI, actions, dismiss, and live announcement behavior
packages/eui/src/components/banner/banner.styles.ts Emotion styles, including container-query based responsive layouts
packages/eui/src/components/banner/banner.stories.tsx Storybook stories and interactive playground scenarios
packages/eui/src/components/banner/banner.test.tsx RTL unit tests for rendering, props, actions, dismiss, and live region behavior
packages/eui/i18ntokens.json Adds i18n token for the dismiss button aria-label (plus regen reordering)
packages/eui/changelogs/upcoming/9673.md Changelog entry for new component

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@mgadewoll
mgadewoll force-pushed the feat/banner-component branch from 61abd9f to 81da904 Compare May 22, 2026 13:31
@acstll

acstll commented May 26, 2026

Copy link
Copy Markdown
Contributor

Reviewing today 👀

>
<div css={containerCssStyles}>
<div
className={`${componentClass}__container`}

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ℹ️ The idea of adding more classes here is to be more flexible for potential future updates, that might happen only or first on consumer side.

@acstll acstll left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 This is looking great, code and implemented component. I left just a couple of nits you can feel free to ignore. 🚢

@elasticmachine

Copy link
Copy Markdown
Collaborator

💚 Build Succeeded

History

cc @mgadewoll

@elasticmachine

Copy link
Copy Markdown
Collaborator

💚 Build Succeeded

History

cc @mgadewoll

@mgadewoll
mgadewoll merged commit 3886a10 into elastic:main May 27, 2026
1 check passed
JasonStoltz pushed a commit to elastic/kibana that referenced this pull request Jun 24, 2026
## Dependency updates

`@elastic/eui` - v116.2.0 ⏩ v116.3.1
`@elastic/eslint-plugin-eui` - v2.13.0 ⏩ v2.14.0

## Package updates

### `@elastic/eui`
[v116.3.1](https://github.com/elastic/eui/blob/main/packages/eui/changelogs/CHANGELOG_2026.md)

**Bug fixes**

- Fixed `EuiTableHeaderCell` and `EuiTableHeaderCellCheckbox` throwing
an error in Jest test environments due to static mocking of
`useGeneratedHtmlId` by generating a stable, unique key with `uuidv4`
([#9698](elastic/eui#9698))
- Fixed an issue where the tooltip anchor wrapper in `EuiAvatar` did not
have the same `border-radius` applied as the avatar itself.
([#9697](elastic/eui#9697))


### `@elastic/eui`
[v116.3.0](https://github.com/elastic/eui/blob/main/packages/eui/changelogs/CHANGELOG_2026.md)

- Added `EuiBanner` component
([#9673](elastic/eui#9673))
- Replaced native browser `title` attributes with `EuiToolTip` across
the following components for consistent tooltips:
([#9643](elastic/eui#9643))
  - `EuiAvatar`
  - `EuiBasicTable`
  - `EuiBreadcrumbs`
  - `EuiComboBox`
  - `EuiDataGrid`
  - `EuiAutoRefresh`
  - `EuiSuperDatePicker`
  - `EuiFieldPassword`
  - `EuiMarkdownEditor`
  - `EuiPagination`
  - `EuiSearchBar`
  - `EuiSelectable`
  - `EuiTextTruncate`
- Extended `EuiToolTip`'s `display` prop to support `"flex"`
([#9643](elastic/eui#9643))
- Added experimental support for sticky headers in `EuiTable`,
`EuiBasicTable` and `EuiInMemoryTable`
([#9682](elastic/eui#9682))

**Bug fixes**

- Fixed `direction="row"` not applying on `EuiSplitPanel.Outer` when
`onClick` was set. ([#9693](elastic/eui#9693))
- Fixed `EuiDatePicker` firing `onChange` with an out-of-bounds date
when navigating to a month or year via the dropdowns while `minDate` or
`maxDate` is set ([#9685](elastic/eui#9685))
- Fixed a visual issue on `EuiPanel` where panels with `onClick` would
render with a `height` difference of `1px`.
([#9694](elastic/eui#9694))
- Fixed an issue in `EuiSelectable` and `EuiComboBox` where interactive
content in group labels wasn't clickable due to overlapping content.
([#9678](elastic/eui#9678))
### `@elastic/eslint-plugin-eui`
[v2.14.0](https://github.com/elastic/eui/blob/main/packages/eslint-plugin/changelogs/CHANGELOG_2026.md)

- Removed auto-fix from `tooltip-button-icon-wrap` rule
([#9695](elastic/eui#9695))

---------

Co-authored-by: Tomasz Kajtoch <[email protected]>
Co-authored-by: Cursor <[email protected]>
Co-authored-by: Lene Gadewoll <[email protected]>
patrykkopycinski pushed a commit to patrykkopycinski/kibana that referenced this pull request Aug 5, 2026
## Dependency updates

`@elastic/eui` - v116.2.0 ⏩ v116.3.1
`@elastic/eslint-plugin-eui` - v2.13.0 ⏩ v2.14.0

## Package updates

### `@elastic/eui`
[v116.3.1](https://github.com/elastic/eui/blob/main/packages/eui/changelogs/CHANGELOG_2026.md)

**Bug fixes**

- Fixed `EuiTableHeaderCell` and `EuiTableHeaderCellCheckbox` throwing
an error in Jest test environments due to static mocking of
`useGeneratedHtmlId` by generating a stable, unique key with `uuidv4`
([elastic#9698](elastic/eui#9698))
- Fixed an issue where the tooltip anchor wrapper in `EuiAvatar` did not
have the same `border-radius` applied as the avatar itself.
([elastic#9697](elastic/eui#9697))


### `@elastic/eui`
[v116.3.0](https://github.com/elastic/eui/blob/main/packages/eui/changelogs/CHANGELOG_2026.md)

- Added `EuiBanner` component
([elastic#9673](elastic/eui#9673))
- Replaced native browser `title` attributes with `EuiToolTip` across
the following components for consistent tooltips:
([elastic#9643](elastic/eui#9643))
  - `EuiAvatar`
  - `EuiBasicTable`
  - `EuiBreadcrumbs`
  - `EuiComboBox`
  - `EuiDataGrid`
  - `EuiAutoRefresh`
  - `EuiSuperDatePicker`
  - `EuiFieldPassword`
  - `EuiMarkdownEditor`
  - `EuiPagination`
  - `EuiSearchBar`
  - `EuiSelectable`
  - `EuiTextTruncate`
- Extended `EuiToolTip`'s `display` prop to support `"flex"`
([elastic#9643](elastic/eui#9643))
- Added experimental support for sticky headers in `EuiTable`,
`EuiBasicTable` and `EuiInMemoryTable`
([elastic#9682](elastic/eui#9682))

**Bug fixes**

- Fixed `direction="row"` not applying on `EuiSplitPanel.Outer` when
`onClick` was set. ([elastic#9693](elastic/eui#9693))
- Fixed `EuiDatePicker` firing `onChange` with an out-of-bounds date
when navigating to a month or year via the dropdowns while `minDate` or
`maxDate` is set ([elastic#9685](elastic/eui#9685))
- Fixed a visual issue on `EuiPanel` where panels with `onClick` would
render with a `height` difference of `1px`.
([elastic#9694](elastic/eui#9694))
- Fixed an issue in `EuiSelectable` and `EuiComboBox` where interactive
content in group labels wasn't clickable due to overlapping content.
([elastic#9678](elastic/eui#9678))
### `@elastic/eslint-plugin-eui`
[v2.14.0](https://github.com/elastic/eui/blob/main/packages/eslint-plugin/changelogs/CHANGELOG_2026.md)

- Removed auto-fix from `tooltip-button-icon-wrap` rule
([elastic#9695](elastic/eui#9695))

---------

Co-authored-by: Tomasz Kajtoch <[email protected]>
Co-authored-by: Cursor <[email protected]>
Co-authored-by: Lene Gadewoll <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants