Repository navigation
[EuiButtonGroup] Implement redesign #1 - Add EuiButtonContext & Children API support - #9845
Conversation
There was a problem hiding this comment.
Pull request overview
This PR is the first step of the EuiButtonGroup redesign, introducing a new Children API (rendering mixed button components via children) and a shared EuiButtonGroupContext so the group can cascade common props (size/disabled/full-width) to nested button components.
Changes:
- Added a new
EuiButtonGroupChildren API withvariant="default"and optionalgutterSizespacing. - Introduced
EuiButtonGroupContextand updatedEuiButton,EuiButtonEmpty, andEuiButtonIconto consume group-level props. - Updated styles/tests/docs and fixed a disabled-state double-border visual issue.
Reviewed changes
Copilot reviewed 14 out of 14 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/website/docs/components/navigation/buttons/group.mdx | Updated docs to cover Children vs Options APIs and updated prop tables. |
| packages/eui/src/components/date_picker/super_date_picker/time_window_buttons.tsx | Updated to new button group size styles API (styles.size[...]). |
| packages/eui/src/components/button/button.tsx | Consumes EuiButtonGroupContext to apply shared group props. |
| packages/eui/src/components/button/button_icon/button_icon.tsx | Consumes EuiButtonGroupContext to apply shared group props. |
| packages/eui/src/components/button/button_group/index.ts | Exported EuiButtonGroupChildrenProps. |
| packages/eui/src/components/button/button_group/button_group.tsx | Split options vs children rendering and added Children API props/behavior. |
| packages/eui/src/components/button/button_group/button_group.test.tsx | Added comprehensive unit tests for the Children API. |
| packages/eui/src/components/button/button_group/button_group.styles.ts | Added Children API variant styling and gutter-size styles; refactored size styles to styles.size. |
| packages/eui/src/components/button/button_group/button_group.docgen.tsx | Added docgen helpers to support prop extraction for overloaded component types. |
| packages/eui/src/components/button/button_group/button_group_context.ts | Added context used to cascade group props to nested button components. |
| packages/eui/src/components/button/button_group/button_group_children.stories.tsx | Added Storybook stories for the new Children API and mixed-content examples. |
| packages/eui/src/components/button/button_group/button_group_button.styles.ts | Adjusted disabled border rendering to prevent duplicate borders. |
| packages/eui/src/components/button/button_empty/button_empty.tsx | Consumes EuiButtonGroupContext to apply shared group props. |
| packages/eui/changelogs/upcoming/9845.md | Added changelog entry for the new API + context and border fix. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
2 visual difference(s) found - expand to review, then click Approve visual changes to update baselineseuibuttongroup (2 differences)
|
7 visual difference(s) found - expand to review, then click Approve visual changes to update baselineseuibuttongroup (7 differences)
|
7 visual difference(s) found - expand to review, then click Approve visual changes to update baselineseuibuttongroup (7 differences)
|
- this change is unrelated to the button group redesign
aca9e16 to
e968b55
Compare
2 visual difference(s) found - expand to review, then click Approve visual changes to update baselineseuibuttongroup (2 differences)
|
2 visual difference(s) found - expand to review, then click Approve visual changes to update baselineseuibuttongroup (2 differences)
|
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 14 out of 22 changed files in this pull request and generated no new comments.
Comments suppressed due to low confidence (2)
packages/eui/src/components/button/button_group/button_group.tsx:153
OptionsModePropsis currently built fromHTMLAttributes<HTMLFieldSetElement>, which includes achildrenprop. That means consumers can pass bothoptionsandchildrenwithout a type error, even though the runtime always renders the Options API and ignoreschildrenwhenoptionsis provided. To keep the two APIs truly mutually exclusive at the type level, disallowchildrenin Options mode.
type OptionsModeProps = Omit<
HTMLAttributes<HTMLFieldSetElement>,
'onChange' | 'color'
> &
EuiButtonGroupProps;
packages/eui/src/components/button/button_group/button_group.tsx:285
- The Children API publicly exposes an
onChangeprop, but the only supportedvarianttype is currently'default'andEuiButtonGroupChildrennever callsonChange(it is explicitly discarded). This makesonChangea no-op prop in the shipped API. Either removeonChangeuntil a selection variant is implemented, or add the selection behavior in this PR so the prop works as documented.
* Callback fired when a child button is selected.
* Returns the `id` of the clicked option.
* Applies only for `variant="selection"`.
*/
onChange?: (id: string) => void;
| * Returns the `id` of the clicked option. | ||
| * Applies only for `variant="selection"`. | ||
| */ | ||
| onChange?: (id: string) => void; |
There was a problem hiding this comment.
ℹ️ This was added here already to prevent having to change the type back and forth. Chunk 3 will implement the variant="selection" which will use the onChange prop.
acstll
left a comment
There was a problem hiding this comment.
Code looks correct, I left a few nits, anything blocking. Also, followed QA guide and everything seems to be working as expected!
There is one concern pointed out by Claude I think it's worth raising: buttons rendered in a popover triggered by a button of the group, will inherit the props from context.
There's this LLM-generated gist with a POC test file that validates the issue: https://gist.github.com/acstll/1c5daafbeb49ea1a4284cdfbf690638c (there the isDisabled test is a bit silly because it wouldn't be possible to open the popover, but it makes the point 😁) — what a fix for this would look like is not clear to me… but I think it'd be worthwhile trying to address it in this same PR, but I'm interested in your opinion 🙏
<EuiButtonGroup legend="Toolbar" buttonSize="m">
<EuiPopover
isOpen
closePopover={() => {}}
button={<EuiButton>More</EuiButton>}
>
{/* Portaled panel content… inherits `size`? */}
<EuiButton>Delete</EuiButton>
</EuiPopover>
</EuiButtonGroup>… stop context prop propagation; refactor button props into a shared hook
@acstll That's a great catch! And an inherent problem of React context with our component architecture of EuiPopover being a wrapper around the button. 🫠 If we ever get to refactoring EuiPopover (which I really wish for) we should really get rid of this approach and use e.g. refs instead. It's been trouble in different situations. What we could do for now is add a context layer in EuiPopover that components can read as inheritance stop indicator. Conceptually I think it makes sense considering popover panel content is its own scoped render context. That would mean components could do conditions like "am i in a popover ? do/use X : do/use Y". I added this in 4277cc5. This adds a hook
|
acstll
left a comment
There was a problem hiding this comment.
🟢 Thanks for addressing my feedback so quickly!
🤖 / for a future follow-up we could consider an alternative to the useIsInsideEuiPopover hook: a "reset" strategy with something like an EuiResetButtonContext wrapping the popover, so the button doesn't have to know whether it is inside a popover or not
@acstll Thanks for the suggestion! While both approaches are similar and mainly differ conceptually (who owns the boundary?), I would agree that it would be slightly better to use a |
1 visual difference(s) found - expand to review, then click Approve visual changes to update baselineseuicallout (1 difference)
|
💚 Build Succeeded
History
cc @mgadewoll |
💚 Build Succeeded
History
cc @mgadewoll |
LGTM! 🚢 🙌 |
## Dependency updates `@elastic/eui` - 118.0.0 ⏩ 119.0.0 `@elastic/eslint-plugin-eui` - 2.15.0 ⏩ 2.16.0 `@elastic/eui-test-helpers` - 1.2.0 ⏩ 1.3.0 ## Changes - Added 3 new `EuiFlyoutMenu` i18n tokens (`euiFlyoutMenu.history.tooltip`, `euiFlyoutMenu.pagination.first`, `euiFlyoutMenu.pagination.last`) to `i18n_eui_mapping.tsx` and all translation files - Replaced removed `plusInCircle` icon alias with `plusCircle` in the ML plugin (data frame analytics, anomaly detection jobs, and trained models menus) ## Package updates ### `@elastic/eslint-plugin-eui` [v2.16.0](https://github.com/elastic/eui/blob/main/packages/eslint-plugin/changelogs/CHANGELOG_2026.md) - Added new `@elastic/eui/no-nested-copy-tooltip` rule to improve `EuiCopy` usage ([#9852](elastic/eui#9852)) - Updated `@elastic/eui/tooltip-button-icon-wrap` with an exception for `EuiCopy` usage covered by `@elastic/eui/no-nested-copy-tooltip` ([#9852](elastic/eui#9852)) - Added `button-group-no-invalid-children` rule ([#9849](elastic/eui#9849)) - Added `no-deprecated-icon-aliases` rule ([#9815](elastic/eui#9815)) ### `@elastic/eui` [v119.0.0](https://github.com/elastic/eui/blob/main/packages/eui/changelogs/CHANGELOG_2026.md) - Bundled icon glyph files into `dist/svgs/` and added `dist/eui-icons.json` manifest (mapping icon filename stems to SVG content strings) ([#9873](elastic/eui#9873)) - Added `hasAriaDisabled` prop to `EuiContextMenuItem` ([#9870](elastic/eui#9870)) - Updated `EuiButtonGroup`: ([#9845](elastic/eui#9845)) - Added new render API via `children` prop that allows passing button components as children - Added `variant` prop (usable only with `children` prop) - Added `gutterSize` prop (usable only with `children` and `variant="default"` prop) - Updated `EuiButton`, `EuiButtonEmpty` and `EuiButtonIcon` to consume a `EuiButtonContext` allowing the group to control common props ([#9845](elastic/eui#9845)) - Updated `EuiFlyoutMenu`: ([#9856](elastic/eui#9856)) - Added `leadingActions` and `trailingActions` props, which accept the new `EuiFlyoutMenuAction` type supporting `toolTipContent` and `toolTipProps` - Changed the history trigger icon to `clockCounter` - Added control-group dividers between built-in controls - Added `onFirst`, `onLast` to `pagination`, which render optional buttons for jumping to the beginning and end of the list. - Deprecated additional `EuiIcon` types that are not represented in Figma ([#9815](elastic/eui#9815)) **Bug fixes** - Fixed the missing type declaration for the `focusEuiToolTipTrigger` test helper ([#9870](elastic/eui#9870)) - Fixed generated icon IDs to remain stable during server-side rendering ([#9866](elastic/eui#9866)) - Fixed a visual bug in `EuiButtonGroup` that rendered duplicate borders on disabled buttons ([#9845](elastic/eui#9845)) - The `EuiFlyoutMenu` history popover now only appears when `historyItems` has more than one entry. When there is a single entry in history, only the Back button is shown. ([#9856](elastic/eui#9856)) - Fixed `EuiFlyoutMenu` pagination controls disappearing when `pagination.total` is `1`; the controls now render (as "1 of 1" with both Prev/Next disabled) for any `total` of at least `1` ([#9856](elastic/eui#9856)) **Deprecations** - Deprecated `customActions` and `EuiFlyoutMenuCustomAction` in `EuiFlyoutMenu`; use `trailingActions` and `EuiFlyoutMenuAction` instead ([#9856](elastic/eui#9856)) **Breaking changes** - Removed most deprecated `EuiIcon` types and their icon assets. 16 widely-used deprecated aliases (e.g. `alert`, `search`, `visPie`) remain temporarily and will be removed in a future release ([#9832](elastic/eui#9832)) ([#9815](elastic/eui#9815)) ### `@elastic/eui-test-helpers` [v1.3.0](https://github.com/elastic/eui/blob/main/packages/test-helpers/changelogs/CHANGELOG_2026.md) - Added `EuiDataGridObject` with `rows`, `cell()`, `cells()`, `doActionOnColumn()` and `openFullScreenMode()`/`closeFullScreenMode()` ([#9874](elastic/eui#9874)) - Added `EuiSuperSelectObject` with `selectOptionByValue()`, `selectOptionByLabel()` and `getSelectedValue()` ([#9874](elastic/eui#9874)) - Added `EuiGlobalToastListObject` with a `toasts` locator and `closeAll()` ([#9874](elastic/eui#9874)) --------- Co-authored-by: Lene Gadewoll <[email protected]> Co-authored-by: kibanamachine <[email protected]>
## Dependency updates `@elastic/eui` - 118.0.0 ⏩ 119.0.0 `@elastic/eslint-plugin-eui` - 2.15.0 ⏩ 2.16.0 `@elastic/eui-test-helpers` - 1.2.0 ⏩ 1.3.0 ## Changes - Added 3 new `EuiFlyoutMenu` i18n tokens (`euiFlyoutMenu.history.tooltip`, `euiFlyoutMenu.pagination.first`, `euiFlyoutMenu.pagination.last`) to `i18n_eui_mapping.tsx` and all translation files - Replaced removed `plusInCircle` icon alias with `plusCircle` in the ML plugin (data frame analytics, anomaly detection jobs, and trained models menus) ## Package updates ### `@elastic/eslint-plugin-eui` [v2.16.0](https://github.com/elastic/eui/blob/main/packages/eslint-plugin/changelogs/CHANGELOG_2026.md) - Added new `@elastic/eui/no-nested-copy-tooltip` rule to improve `EuiCopy` usage ([elastic#9852](elastic/eui#9852)) - Updated `@elastic/eui/tooltip-button-icon-wrap` with an exception for `EuiCopy` usage covered by `@elastic/eui/no-nested-copy-tooltip` ([elastic#9852](elastic/eui#9852)) - Added `button-group-no-invalid-children` rule ([elastic#9849](elastic/eui#9849)) - Added `no-deprecated-icon-aliases` rule ([elastic#9815](elastic/eui#9815)) ### `@elastic/eui` [v119.0.0](https://github.com/elastic/eui/blob/main/packages/eui/changelogs/CHANGELOG_2026.md) - Bundled icon glyph files into `dist/svgs/` and added `dist/eui-icons.json` manifest (mapping icon filename stems to SVG content strings) ([elastic#9873](elastic/eui#9873)) - Added `hasAriaDisabled` prop to `EuiContextMenuItem` ([elastic#9870](elastic/eui#9870)) - Updated `EuiButtonGroup`: ([elastic#9845](elastic/eui#9845)) - Added new render API via `children` prop that allows passing button components as children - Added `variant` prop (usable only with `children` prop) - Added `gutterSize` prop (usable only with `children` and `variant="default"` prop) - Updated `EuiButton`, `EuiButtonEmpty` and `EuiButtonIcon` to consume a `EuiButtonContext` allowing the group to control common props ([elastic#9845](elastic/eui#9845)) - Updated `EuiFlyoutMenu`: ([elastic#9856](elastic/eui#9856)) - Added `leadingActions` and `trailingActions` props, which accept the new `EuiFlyoutMenuAction` type supporting `toolTipContent` and `toolTipProps` - Changed the history trigger icon to `clockCounter` - Added control-group dividers between built-in controls - Added `onFirst`, `onLast` to `pagination`, which render optional buttons for jumping to the beginning and end of the list. - Deprecated additional `EuiIcon` types that are not represented in Figma ([elastic#9815](elastic/eui#9815)) **Bug fixes** - Fixed the missing type declaration for the `focusEuiToolTipTrigger` test helper ([elastic#9870](elastic/eui#9870)) - Fixed generated icon IDs to remain stable during server-side rendering ([elastic#9866](elastic/eui#9866)) - Fixed a visual bug in `EuiButtonGroup` that rendered duplicate borders on disabled buttons ([elastic#9845](elastic/eui#9845)) - The `EuiFlyoutMenu` history popover now only appears when `historyItems` has more than one entry. When there is a single entry in history, only the Back button is shown. ([elastic#9856](elastic/eui#9856)) - Fixed `EuiFlyoutMenu` pagination controls disappearing when `pagination.total` is `1`; the controls now render (as "1 of 1" with both Prev/Next disabled) for any `total` of at least `1` ([elastic#9856](elastic/eui#9856)) **Deprecations** - Deprecated `customActions` and `EuiFlyoutMenuCustomAction` in `EuiFlyoutMenu`; use `trailingActions` and `EuiFlyoutMenuAction` instead ([elastic#9856](elastic/eui#9856)) **Breaking changes** - Removed most deprecated `EuiIcon` types and their icon assets. 16 widely-used deprecated aliases (e.g. `alert`, `search`, `visPie`) remain temporarily and will be removed in a future release ([elastic#9832](elastic/eui#9832)) ([elastic#9815](elastic/eui#9815)) ### `@elastic/eui-test-helpers` [v1.3.0](https://github.com/elastic/eui/blob/main/packages/test-helpers/changelogs/CHANGELOG_2026.md) - Added `EuiDataGridObject` with `rows`, `cell()`, `cells()`, `doActionOnColumn()` and `openFullScreenMode()`/`closeFullScreenMode()` ([elastic#9874](elastic/eui#9874)) - Added `EuiSuperSelectObject` with `selectOptionByValue()`, `selectOptionByLabel()` and `getSelectedValue()` ([elastic#9874](elastic/eui#9874)) - Added `EuiGlobalToastListObject` with a `toasts` locator and `closeAll()` ([elastic#9874](elastic/eui#9874)) --------- Co-authored-by: Lene Gadewoll <[email protected]> Co-authored-by: kibanamachine <[email protected]>
## Dependency updates `@elastic/eui` - 118.0.0 ⏩ 119.0.0 `@elastic/eslint-plugin-eui` - 2.15.0 ⏩ 2.16.0 `@elastic/eui-test-helpers` - 1.2.0 ⏩ 1.3.0 ## Changes - Added 3 new `EuiFlyoutMenu` i18n tokens (`euiFlyoutMenu.history.tooltip`, `euiFlyoutMenu.pagination.first`, `euiFlyoutMenu.pagination.last`) to `i18n_eui_mapping.tsx` and all translation files - Replaced removed `plusInCircle` icon alias with `plusCircle` in the ML plugin (data frame analytics, anomaly detection jobs, and trained models menus) ## Package updates ### `@elastic/eslint-plugin-eui` [v2.16.0](https://github.com/elastic/eui/blob/main/packages/eslint-plugin/changelogs/CHANGELOG_2026.md) - Added new `@elastic/eui/no-nested-copy-tooltip` rule to improve `EuiCopy` usage ([elastic#9852](elastic/eui#9852)) - Updated `@elastic/eui/tooltip-button-icon-wrap` with an exception for `EuiCopy` usage covered by `@elastic/eui/no-nested-copy-tooltip` ([elastic#9852](elastic/eui#9852)) - Added `button-group-no-invalid-children` rule ([elastic#9849](elastic/eui#9849)) - Added `no-deprecated-icon-aliases` rule ([elastic#9815](elastic/eui#9815)) ### `@elastic/eui` [v119.0.0](https://github.com/elastic/eui/blob/main/packages/eui/changelogs/CHANGELOG_2026.md) - Bundled icon glyph files into `dist/svgs/` and added `dist/eui-icons.json` manifest (mapping icon filename stems to SVG content strings) ([elastic#9873](elastic/eui#9873)) - Added `hasAriaDisabled` prop to `EuiContextMenuItem` ([elastic#9870](elastic/eui#9870)) - Updated `EuiButtonGroup`: ([elastic#9845](elastic/eui#9845)) - Added new render API via `children` prop that allows passing button components as children - Added `variant` prop (usable only with `children` prop) - Added `gutterSize` prop (usable only with `children` and `variant="default"` prop) - Updated `EuiButton`, `EuiButtonEmpty` and `EuiButtonIcon` to consume a `EuiButtonContext` allowing the group to control common props ([elastic#9845](elastic/eui#9845)) - Updated `EuiFlyoutMenu`: ([elastic#9856](elastic/eui#9856)) - Added `leadingActions` and `trailingActions` props, which accept the new `EuiFlyoutMenuAction` type supporting `toolTipContent` and `toolTipProps` - Changed the history trigger icon to `clockCounter` - Added control-group dividers between built-in controls - Added `onFirst`, `onLast` to `pagination`, which render optional buttons for jumping to the beginning and end of the list. - Deprecated additional `EuiIcon` types that are not represented in Figma ([elastic#9815](elastic/eui#9815)) **Bug fixes** - Fixed the missing type declaration for the `focusEuiToolTipTrigger` test helper ([elastic#9870](elastic/eui#9870)) - Fixed generated icon IDs to remain stable during server-side rendering ([elastic#9866](elastic/eui#9866)) - Fixed a visual bug in `EuiButtonGroup` that rendered duplicate borders on disabled buttons ([elastic#9845](elastic/eui#9845)) - The `EuiFlyoutMenu` history popover now only appears when `historyItems` has more than one entry. When there is a single entry in history, only the Back button is shown. ([elastic#9856](elastic/eui#9856)) - Fixed `EuiFlyoutMenu` pagination controls disappearing when `pagination.total` is `1`; the controls now render (as "1 of 1" with both Prev/Next disabled) for any `total` of at least `1` ([elastic#9856](elastic/eui#9856)) **Deprecations** - Deprecated `customActions` and `EuiFlyoutMenuCustomAction` in `EuiFlyoutMenu`; use `trailingActions` and `EuiFlyoutMenuAction` instead ([elastic#9856](elastic/eui#9856)) **Breaking changes** - Removed most deprecated `EuiIcon` types and their icon assets. 16 widely-used deprecated aliases (e.g. `alert`, `search`, `visPie`) remain temporarily and will be removed in a future release ([elastic#9832](elastic/eui#9832)) ([elastic#9815](elastic/eui#9815)) ### `@elastic/eui-test-helpers` [v1.3.0](https://github.com/elastic/eui/blob/main/packages/test-helpers/changelogs/CHANGELOG_2026.md) - Added `EuiDataGridObject` with `rows`, `cell()`, `cells()`, `doActionOnColumn()` and `openFullScreenMode()`/`closeFullScreenMode()` ([elastic#9874](elastic/eui#9874)) - Added `EuiSuperSelectObject` with `selectOptionByValue()`, `selectOptionByLabel()` and `getSelectedValue()` ([elastic#9874](elastic/eui#9874)) - Added `EuiGlobalToastListObject` with a `toasts` locator and `closeAll()` ([elastic#9874](elastic/eui#9874)) --------- Co-authored-by: Lene Gadewoll <[email protected]> Co-authored-by: kibanamachine <[email protected]>
## Dependency updates `@elastic/eui` - 118.0.0 ⏩ 119.0.0 `@elastic/eslint-plugin-eui` - 2.15.0 ⏩ 2.16.0 `@elastic/eui-test-helpers` - 1.2.0 ⏩ 1.3.0 ## Changes - Added 3 new `EuiFlyoutMenu` i18n tokens (`euiFlyoutMenu.history.tooltip`, `euiFlyoutMenu.pagination.first`, `euiFlyoutMenu.pagination.last`) to `i18n_eui_mapping.tsx` and all translation files - Replaced removed `plusInCircle` icon alias with `plusCircle` in the ML plugin (data frame analytics, anomaly detection jobs, and trained models menus) ## Package updates ### `@elastic/eslint-plugin-eui` [v2.16.0](https://github.com/elastic/eui/blob/main/packages/eslint-plugin/changelogs/CHANGELOG_2026.md) - Added new `@elastic/eui/no-nested-copy-tooltip` rule to improve `EuiCopy` usage ([elastic#9852](elastic/eui#9852)) - Updated `@elastic/eui/tooltip-button-icon-wrap` with an exception for `EuiCopy` usage covered by `@elastic/eui/no-nested-copy-tooltip` ([elastic#9852](elastic/eui#9852)) - Added `button-group-no-invalid-children` rule ([elastic#9849](elastic/eui#9849)) - Added `no-deprecated-icon-aliases` rule ([elastic#9815](elastic/eui#9815)) ### `@elastic/eui` [v119.0.0](https://github.com/elastic/eui/blob/main/packages/eui/changelogs/CHANGELOG_2026.md) - Bundled icon glyph files into `dist/svgs/` and added `dist/eui-icons.json` manifest (mapping icon filename stems to SVG content strings) ([elastic#9873](elastic/eui#9873)) - Added `hasAriaDisabled` prop to `EuiContextMenuItem` ([elastic#9870](elastic/eui#9870)) - Updated `EuiButtonGroup`: ([elastic#9845](elastic/eui#9845)) - Added new render API via `children` prop that allows passing button components as children - Added `variant` prop (usable only with `children` prop) - Added `gutterSize` prop (usable only with `children` and `variant="default"` prop) - Updated `EuiButton`, `EuiButtonEmpty` and `EuiButtonIcon` to consume a `EuiButtonContext` allowing the group to control common props ([elastic#9845](elastic/eui#9845)) - Updated `EuiFlyoutMenu`: ([elastic#9856](elastic/eui#9856)) - Added `leadingActions` and `trailingActions` props, which accept the new `EuiFlyoutMenuAction` type supporting `toolTipContent` and `toolTipProps` - Changed the history trigger icon to `clockCounter` - Added control-group dividers between built-in controls - Added `onFirst`, `onLast` to `pagination`, which render optional buttons for jumping to the beginning and end of the list. - Deprecated additional `EuiIcon` types that are not represented in Figma ([elastic#9815](elastic/eui#9815)) **Bug fixes** - Fixed the missing type declaration for the `focusEuiToolTipTrigger` test helper ([elastic#9870](elastic/eui#9870)) - Fixed generated icon IDs to remain stable during server-side rendering ([elastic#9866](elastic/eui#9866)) - Fixed a visual bug in `EuiButtonGroup` that rendered duplicate borders on disabled buttons ([elastic#9845](elastic/eui#9845)) - The `EuiFlyoutMenu` history popover now only appears when `historyItems` has more than one entry. When there is a single entry in history, only the Back button is shown. ([elastic#9856](elastic/eui#9856)) - Fixed `EuiFlyoutMenu` pagination controls disappearing when `pagination.total` is `1`; the controls now render (as "1 of 1" with both Prev/Next disabled) for any `total` of at least `1` ([elastic#9856](elastic/eui#9856)) **Deprecations** - Deprecated `customActions` and `EuiFlyoutMenuCustomAction` in `EuiFlyoutMenu`; use `trailingActions` and `EuiFlyoutMenuAction` instead ([elastic#9856](elastic/eui#9856)) **Breaking changes** - Removed most deprecated `EuiIcon` types and their icon assets. 16 widely-used deprecated aliases (e.g. `alert`, `search`, `visPie`) remain temporarily and will be removed in a future release ([elastic#9832](elastic/eui#9832)) ([elastic#9815](elastic/eui#9815)) ### `@elastic/eui-test-helpers` [v1.3.0](https://github.com/elastic/eui/blob/main/packages/test-helpers/changelogs/CHANGELOG_2026.md) - Added `EuiDataGridObject` with `rows`, `cell()`, `cells()`, `doActionOnColumn()` and `openFullScreenMode()`/`closeFullScreenMode()` ([elastic#9874](elastic/eui#9874)) - Added `EuiSuperSelectObject` with `selectOptionByValue()`, `selectOptionByLabel()` and `getSelectedValue()` ([elastic#9874](elastic/eui#9874)) - Added `EuiGlobalToastListObject` with a `toasts` locator and `closeAll()` ([elastic#9874](elastic/eui#9874)) --------- Co-authored-by: Lene Gadewoll <[email protected]> Co-authored-by: kibanamachine <[email protected]>

























Summary
EuiButtonContextthat enablesEuiButtonGroupto distribute props to nested button components (EuiButton,EuiButtonEmpty,EuiButtonIcon)childrenpropEuiButtonGroupand adds the foundational changes for the button group redesign.EuiButtonContextthatEuiButton,EuiButtonEmptyandEuiButtonIconconsume. (group context overrides children props)EuiButtonGroupto render button groups by passing button components aschildren(handled via conditional internal render componentsEuiButtonGroupOptionsandEuiButtonGroupChildren)variant="default"as first render variant forEuiButtonGroupChildrenas defined by design specsNote
The new Children API is being implemented as standalone sibling API to the existing Options API but will in the future replace the Options API as only existing API.
Note
The approach of implementing a new Children API alongside the existing Options API is on purpose to prevent breaking changes and allow for a phased migration/deprecation.
Additional changes
EuiButtonGroupwhere double borders would be rendered when buttons where disabledEuiButtonResetProviderto provide means for theEuiButtonContextto have a stop boundary for propagation, e.g. if buttons are rendered inside anEuiPopoverpanelAPI Changes
EuiButtonGroupchildrenoptionsprop is passed. Allows to pass button children as components. SupportsEuiButton,EuiButtonEmptyandEuiButtonIconcomponents.EuiButtonGroupvariantchildrenis passed. Defines the visual and functional variant of the button group.EuiButtonGroupgutterSizechildrenis passed. Is applied only in combination withvariant="default". Defines the visual gap that's added between group children.Screenshots
gutterSize="l"isDisabledbuttonSize="m"isFullWidthEuiButtonGroup visual bug fix
Impact Assessment
Note: Most PRs should be tested in Kibana to help gauge their Impact before merging.
Impact level: 🟢 None - Low
🧪 The changes have been run in Kibana CI (🟢 build)
Staged Kibana prep PR/commit: commit - fixes type errors due to
onChangebeing required for Options API but optional for Children APIRelease Readiness
QA instructions for reviewer
💻 Storybook
EuiButtonGroupused with the Options API (production Storybook)optionsalways renders the Options API and doesn't allow Children API specific props (variant,gutterSize)childrenalways renders the Children API and doesn't allows Options API specific props (options)gutterSizeapplies visual gaps correctly (used withchildrenandvariant="default")variant="default"for the Children API matches design specsChecklist before marking Ready for Review
Breaking changes: Addedbreaking changelabel (if applicable)Reviewer checklist