Repository navigation
[EuiButtonGroup] Implement redesign #2 - Segmented variant - #9862
Conversation
bcf5469 to
35730d2
Compare
4 visual difference(s) found - expand to review, then click Approve visual changes to update baselineseuibuttongroup (4 differences)
|
9b699df to
9142089
Compare
|
buildkite test this |
fa037e2 to
3f6da89
Compare
4 visual difference(s) found - expand to review, then click Approve visual changes to update baselineseuibuttongroup (4 differences)
|
5 visual difference(s) found - expand to review, then click Approve visual changes to update baselineseuibuttongroup (4 differences)
euidatagrid (1 difference)
|
8031044 to
a7d4e60
Compare
4 visual difference(s) found - expand to review, then click Approve visual changes to update baselineseuibuttongroup (4 differences)
|
There was a problem hiding this comment.
Pull request overview
This PR implements the second phase of the EuiButtonGroup redesign by adding a new Children API visual variant (variant="segmented") with optional dividers, vertical layout, and configurable wrapping, plus the styling/context plumbing needed to enforce unified segmented button visuals.
Changes:
- Added
variant="segmented"to the Children API with new props:showDividers,layout, andwrap, including child-wrapping to support segmented styling hooks. - Extended shared button context/common-props plumbing to allow button groups to override child button presentation (
fill/display). - Added/updated docs, Storybook stories, styles, and unit tests for the new segmented behavior.
Reviewed changes
Copilot reviewed 8 out of 25 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 | Documents the new segmented variant and adds interactive examples |
| packages/eui/src/components/button/use_button_common_props.ts | Extends common button prop merging to include fill/display for group context overrides |
| packages/eui/src/components/button/button.tsx | Routes fill through common-props hook so group context can override it |
| packages/eui/src/components/button/button_icon/button_icon.tsx | Routes display through common-props hook so group context can override it |
| packages/eui/src/components/button/button_group/button_group.tsx | Implements segmented variant behavior (wrapping/attributes/context overrides) in Children API |
| packages/eui/src/components/button/button_group/button_group.test.tsx | Adds coverage for segmented wrapping, fragment flattening, and new data attributes |
| packages/eui/src/components/button/button_group/button_group.styles.ts | Adds segmented styling (container inset, dividers, vertical layout, no-wrap behavior) |
| packages/eui/src/components/button/button_group/button_group_children.stories.tsx | Adds segmented stories/VRT cases and updates docgen typing approach |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
1 visual difference(s) found - expand to review, then click Approve visual changes to update baselineseuidatagrid (1 difference)
|
|
buildkite test this |
@acstll That's a good point and from what I understood that will be the case in the future just not for button groups but instead for a toolbar component we want to add (if we ever get to it) which would allow to compose different groups of things (buttons, button group, controls etc). cc @JoseLuisGJ |
@acstll Yeah I noticed it too, but since we're gonna flip the design for the Options API button group to the new one in one of the next steps, it's not worth updating anymore imho 😅 |
6 visual difference(s) found - expand to review, then click Approve visual changes to update baselineseuibuttongroup (5 differences)
euidatagrid (1 difference)
|
acstll
left a comment
There was a problem hiding this comment.
🟢 Thanks for addressing the feedback!
I agree the right place for those "semantic" dividers is a toolbar and not this (which is already a group). Thanks for the clarification.
55 visual difference(s) found - expand to review, then click Approve visual changes to update baselineseuiicon (2 differences)
euimarkdownformat (3 differences)
euicombobox (9 differences)
euiform (1 difference)
euiinlineedittext (2 differences)
euiflexgrid (1 difference)
euiflyout (14 differences)
euiheader (4 differences)
euibuttongroup (7 differences)
euicollapsiblenav (4 differences)
euicontextmenu (1 difference)
euikeypadmenu (1 difference)
euidatagrid (5 differences)
euitable (1 difference)
|
- preserves enough space for the focus outline and prevents it from being cut off
e387b8a to
d4a9151
Compare
55 visual difference(s) found - expand to review, then click Approve visual changes to update baselineseuibadge (3 differences)
euiicon (2 differences)
euicombobox (9 differences)
euiform (1 difference)
euiinlineedittext (2 differences)
euiflexgrid (1 difference)
euiflyout (14 differences)
euiheader (4 differences)
euibuttongroup (7 differences)
euicollapsiblenav (4 differences)
euicontextmenu (1 difference)
euikeypadmenu (1 difference)
euidatagrid (5 differences)
euitable (1 difference)
|
53 visual difference(s) found - expand to review, then click Approve visual changes to update baselineseuiicon (2 differences)
euicombobox (9 differences)
euiform (1 difference)
euiinlineedittext (2 differences)
euiflexgrid (1 difference)
euiflyout (14 differences)
euiheader (4 differences)
euibuttongroup (8 differences)
euicollapsiblenav (4 differences)
euicontextmenu (1 difference)
euikeypadmenu (1 difference)
euidatagrid (5 differences)
euitable (1 difference)
|
📷 8 visual difference(s) foundLook at the visual diff below. If everything is expected, run Approve visual changes to update baselines, re-run the job or make appropriate fixes. See the visual regression testing wiki for more information. Expand to revieweuibuttongroup (8 differences)
|
📷 6 visual difference(s) foundLook at the visual diff below. If everything is expected, run Approve visual changes to update baselines, re-run the job or make appropriate fixes. See the visual regression testing wiki for more information. Expand to revieweuibuttongroup (6 differences)
|
📷 4 visual difference(s) foundLook at the visual diff below. If everything is expected, run Approve visual changes to update baselines, re-run the job or make appropriate fixes. See the visual regression testing wiki for more information. Expand to revieweuibuttongroup (4 differences)
|
💚 Build Succeeded
History
cc @mgadewoll |
💚 Build Succeeded
History
cc @mgadewoll |
## Dependency updates `@elastic/eui` - 119.0.0 ⏩ 119.1.0 `@elastic/eui-test-helpers` - 1.3.0 ⏩ 1.4.0 ## Changes - Updated usages of `EuiFilePickerClass` to `EuiFilePickerRef` after the migration of `EuiFilePicker` from class to function component ## Package updates ### `@elastic/eui` [v119.1.0](https://github.com/elastic/eui/blob/main/packages/eui/changelogs/CHANGELOG_2026.md) - Updated `EuiFlyoutMenu` action icon spacing: `leadingActions` and `trailingActions` icons are now grouped with a consistent gap between each icon ([#9887](elastic/eui#9887)) - Updated `EuiFlyoutMenu` back button to show a tooltip with the previous page title (e.g. "Back to Page 1") when history context is available ([#9887](elastic/eui#9887)) - Added `cursorDefault`, `logIn`, and `routeSplit` glyphs to `EuiIcon` ([#9885](elastic/eui#9885)) - Updated `EuiSplitButton` to apply redesign style changes ([#9865](elastic/eui#9865)) - Added a development warning to `useGeneratedHtmlId` and `htmlIdGenerator` when the passed `prefix`/`suffix` contains whitespace, which generates invalid HTML IDs ([#9868](elastic/eui#9868)) - Updated `EuiButtonGroup`: ([#9862](elastic/eui#9862)) - Added `variant="segmented"` which renders the group as visually connected control group - Added `showDividers` prop to optionally render dividers between group children - Added `layout` prop to optionally render icon button groups vertically - Added `wrap` prop to manually control the group wrapping behavior **Bug fixes** - Fixed `EuiDataGrid` header cell actions popover not opening when pressing Enter on a focused actions button ([#9931](elastic/eui#9931)) - Fixed `EuiFilePicker` losing imperative `ref` support when migrated from class to function component ([#9879](elastic/eui#9879)). Use `useRef<EuiFilePickerRef>()` where `useRef<EuiFilePickerClass>()` was previously used. ([#9930](elastic/eui#9930)) - Fixed `EuiSplitButton` having a wrong `inline-size` when `textProps={false}` is set on an action button that has `iconType` ([#9917](elastic/eui#9917)) ### `@elastic/eui-test-helpers` [v1.4.0](https://github.com/elastic/eui/blob/main/packages/test-helpers/changelogs/CHANGELOG_2026.md) - Added `EuiSelectableObject` with `options`, `selectOption(label)` and `search(term)` ([#9908](elastic/eui#9908)) --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Hannah Mudge <[email protected]>
## Dependency updates `@elastic/eui` - 119.0.0 ⏩ 119.1.0 `@elastic/eui-test-helpers` - 1.3.0 ⏩ 1.4.0 ## Changes - Updated usages of `EuiFilePickerClass` to `EuiFilePickerRef` after the migration of `EuiFilePicker` from class to function component ## Package updates ### `@elastic/eui` [v119.1.0](https://github.com/elastic/eui/blob/main/packages/eui/changelogs/CHANGELOG_2026.md) - Updated `EuiFlyoutMenu` action icon spacing: `leadingActions` and `trailingActions` icons are now grouped with a consistent gap between each icon ([elastic#9887](elastic/eui#9887)) - Updated `EuiFlyoutMenu` back button to show a tooltip with the previous page title (e.g. "Back to Page 1") when history context is available ([elastic#9887](elastic/eui#9887)) - Added `cursorDefault`, `logIn`, and `routeSplit` glyphs to `EuiIcon` ([elastic#9885](elastic/eui#9885)) - Updated `EuiSplitButton` to apply redesign style changes ([elastic#9865](elastic/eui#9865)) - Added a development warning to `useGeneratedHtmlId` and `htmlIdGenerator` when the passed `prefix`/`suffix` contains whitespace, which generates invalid HTML IDs ([elastic#9868](elastic/eui#9868)) - Updated `EuiButtonGroup`: ([elastic#9862](elastic/eui#9862)) - Added `variant="segmented"` which renders the group as visually connected control group - Added `showDividers` prop to optionally render dividers between group children - Added `layout` prop to optionally render icon button groups vertically - Added `wrap` prop to manually control the group wrapping behavior **Bug fixes** - Fixed `EuiDataGrid` header cell actions popover not opening when pressing Enter on a focused actions button ([elastic#9931](elastic/eui#9931)) - Fixed `EuiFilePicker` losing imperative `ref` support when migrated from class to function component ([elastic#9879](elastic/eui#9879)). Use `useRef<EuiFilePickerRef>()` where `useRef<EuiFilePickerClass>()` was previously used. ([elastic#9930](elastic/eui#9930)) - Fixed `EuiSplitButton` having a wrong `inline-size` when `textProps={false}` is set on an action button that has `iconType` ([elastic#9917](elastic/eui#9917)) ### `@elastic/eui-test-helpers` [v1.4.0](https://github.com/elastic/eui/blob/main/packages/test-helpers/changelogs/CHANGELOG_2026.md) - Added `EuiSelectableObject` with `options`, `selectOption(label)` and `search(term)` ([elastic#9908](elastic/eui#9908)) --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Hannah Mudge <[email protected]>
…astic#9862) Co-authored-by: kibanamachine <[email protected]>





































































































































































Summary
Note
This PR is part 2 of implementing a new button group design and API.
It's build on fundamentals added in part 1.
EuiButtonGroupfor usage with the new Children API.variant="segmented"which renders the button group as visually connected control group.showDividersprop to optionally show dividers between group childrenlayoutprop to optionally render button groups verticallywrapprop to manually control wrapping behaviorAPI Changes
variantsegmentedvalue option. Only applied when used with the Children API.showDividersfalse. Only applied when used with the Children API.layouthorizontal. Should only be used with icon button children. Only applied when used with the Children API.wraptrue. Only applied when used with the Children API.Screenshots
layout="vertical"isDisabledwrap=truewrap=falseImpact 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)
Release Readiness
Migration guide: {steps or link, for breaking/visual changes or deprecations}QA instructions for reviewer
💻 Storybook
💻 Storybook kitchen sink
variant="segmented"renders the component according to the new design specs (design review done by @JoseLuisGJ)showDividersrenders as expected (show/hide dividers; adds vertical and horizontal dividers)layout="vertical"renders as expectedwraprenders as expected (flex wrap if enabled, flex shrink/scroll if disabled)isFullWidthapplies correctly (only to usages with EuiButton, not EuiButtonIcon)coloron children is ignoredbuttonSizefrom the group parent, manualsizeon children is ignoredisDisabledon the parent disables all childrenisDisabledcan be set on children manuallyEuiButtonGroupused with the Options API (production Storybook)EuiButtonGroupused withvariant="default"Checklist before marking Ready for Review
Breaking changes: Addedbreaking changelabel (if applicable)Reviewer checklist