Repository navigation
[Feat] Add EuiBanner component - #9673
Conversation
69eee87 to
d73c61e
Compare
There was a problem hiding this comment.
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
EuiBannercomponent 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.
- design review feedback
61abd9f to
81da904
Compare
|
Reviewing today 👀 |
| > | ||
| <div css={containerCssStyles}> | ||
| <div | ||
| className={`${componentClass}__container`} |
There was a problem hiding this comment.
ℹ️ 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
left a comment
There was a problem hiding this comment.
🟢 This is looking great, code and implemented component. I left just a couple of nits you can feel free to ignore. 🚢
💚 Build Succeeded
History
cc @mgadewoll |
💚 Build SucceededHistory
cc @mgadewoll |
## 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]>
## 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]>
Summary
This PR adds a new
EuiBannercomponent.This component is based on the previous Kibana custom implementation of
AnnouncementBanner(PR)API Changes
titlestringtextReactNodemediaReactNodesizes | mcolorhighlighted | plainhighlightedactionProps{ primary: EuiBannerActionPrimaryProps, secondary: EuiBannerActionSecondaryProps }undefinedonDismiss() => voidundefineddismissButtonPropsEuiButtonIconPropsundefinedEuiButtonIconheadingElementh2 | h3 | h4 | h5 | h6h2titleannounceOnMountbooleanfalsetrue, the content is announced by screen readers on mount.Screenshots
msImpact Assessment
Note: Most PRs should be tested in Kibana to help gauge their Impact before merging.
Impact level: 🟢 None
This is a new component that's not used so far.
ℹ️ Kibana is using the custom
AnnouncementBannercomponent, which we should update to returnEuiBannerinstead. (Kibana CI was run with the pre-prepared update in this build)Release Readiness
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
EuiBannermatches design specsEuiBannerprops work as expectedChecklist before marking Ready for Review
Breaking changes: Addedbreaking changelabel (if applicable)Reviewer checklist