Skip to content

Add a split button  #4171

Closed as duplicate
Closed as duplicate

Description

@ryankeairns

Dashboard has plans to implement a split button design as it would provide both a preferred, single-click call-to-action and a secondary menu with links to other panel building tools. This could presumably be achieved using existing buttons (certainly as separate buttons altogether), but it's a common pattern that I suspect other teams may find useful as well.

In the case of Dashboard, the main/left section of the 'Add panel' button would open Lens, directly. The arrow/right section would open a context menu, like so:

Screen Shot 2020-10-22 at 11 34 09 AM

Additional considerations...

  • The example shows the filled style, but I supposed this would need to be available in the hollow/outlined version as well
  • I presume the 'extra actions' button will only ever be on the right
  • Is this a new component or is there some way to sort of smush buttons together via props?
  • Ultimately ths may get used in the stacked header nav, not sure what if any complications that presents

Activity

  1. cchaos commented on Oct 22, 2020

    @cchaos
    Contributor

    I've personally pushed back on the idea of split buttons for one major reason. They're very hard to discern.

    For instance when you compare our current buttons that we use to trigger popovers vs the split button propsal:

    Screen Shot 2020-10-22 at 15 55 19 PM

    The only difference between the two is a 1px white line. Yet it could mean the user always uses the main action while never discovering the "more" list. It's a lot of functionality to hide behind a 24x24px target that's not set apart visually.

    Aside from that, and your list of additional considerations, this also complicates popover/context menu triggers quite a bit. So it may look trivial to implement, but in fact will be very difficult because of all the assumptions we've already made about how to integrate buttons with popovers.

    I understand where the need is coming from, but I strongly, pleadingly, ask if you could investigate other options. We've made it 3 years without needing a split button, I'm sure there must be an alternative one of use has come up with.

  2. cchaos commented on Oct 22, 2020

    @cchaos
    Contributor

    Here's also an article on the usage of split buttons. There's a lot of caveats to their usage which is part of what concerns me.
    https://www.nngroup.com/articles/split-buttons/

  3. ryankeairns commented on Oct 27, 2020

    @ryankeairns
    ContributorAuthor

    We can certainly look at more options. The driver for this design was to make Lens the strong default, which this pattern provides and the article suggests, however it's very likely lowering the discoverability of the secondary options beyond intent (which is a major caveat also noted in the article).

    An approach like this could make it easy to overlook the availability of embeddables, Maps, the viz library, and even more content in the future, which strikes me as an undesirable outcome.

    Playing with this more, I'm also not inclined to start a pattern of popover menus from the header/top menu. Perhaps that will be unavoidable in some case, but it feels avoidable here. Closing this discussion to focus on other alternatives. Thanks for the feedback!

  4. cristina-eleonora commented on Jun 18, 2021

    @cristina-eleonora

    Thanks for sharing the article @cchaos. I can see how using a split button can cause many concerns, among which discoverability and confusing it with other components. At the same time, they don't say "don't use it", but offer advices and best practices towards implementing one, which we should consider.

    Split buttons are a known pattern that have been used for a long time now. We've seen it in email clients, Word, and many other applications. They are a variation of grouped buttons which we could also argue that don't benefit from a generous border to separate the actions (even more so when we're using icons).

    Personally, from my experience, using a split button turns out to be a bad experience when:

    • it's not clear there are 2 actions (border missing or too thin)
    • there is no default action and you have to select it from the dropdown (it's actually a "dropdown button")
    • when the 2 actions are too close together (too little padding)

    I can see how using a down icon can make users confuse it with a drop down or a context menu, which is why I like that our current implementation of the split button uses the vertical boxes icon to suggest that there's a more action. Nevertheless, because of the generous spacing between them, they don't look related and the icon button just seems like an independent more actions button.

    Given Kibana's complicated interface with many actions and buttons, I believe it's even more important we mark this belonging. Plus, it seems the search bar is already using a grouped button action in the time picker 😉

    From what I understand, having a grouped button is a common ask, which is why I'd like to suggest a couple of variants with a 1.5px border to separate the actions:

    Screenshot 2021-06-18 at 10 50 12

    More than happy to do some user testing to see if the actions are clear. Thoughts @cchaos @miukimiu @ryankeairns ?

  5. cristina-eleonora commented on Aug 2, 2021

    @cristina-eleonora

    Google calendar, Gmail and Slack recently introduced split buttons to introduce alternatives to default actions:

    Slack

    Screenshot 2021-08-02 at 10 04 37

    Gmail

    Screenshot 2021-08-02 at 10 04 07

    Google Cal

    Screenshot 2021-08-02 at 09 34 33

  6. cchaos commented on Aug 2, 2021

    @cchaos
    Contributor

    @cristina-eleonora I urge you to do some user testing on this. Do one set with the proposed split button and one set with the current guidelines for overflow menus.

    Yes, we all know that lots of application style sites use this pattern with some even introducing them more recently. But just because they do, doesn't mean we should. And just because they do, doesn't mean they are successful. Data on their actual usage would be a better argument.

    I'd like to suggest a couple of variants with a 1.5px border to separate the actions

    Does adding another .5px of white space really solve all these problems? What happens on non-retina screens? On browser's that round to the nearest pixel?

    Sorry to be so contrarian on this topic, but it's one that I still haven't heard solid argument for the proposal other than "others do it". It's also one I feel strongly is more limited in success than having a dedicated, separate button for those "more" options. A "more" button will always be more discoverable than a 1-1.5px divider. And if space is the true limiting factor here, maybe we just have too many options/buttons to begin with.

  7. github-actions commented on Jan 30, 2022

    @github-actions

    👋 Hey there. This issue hasn't had any activity for 180 days. We'll automatically close it if that trend continues for another week. If you feel this issue is still valid and needs attention please let us know with a comment.

  8. added
    stale-issue
    on Jan 30, 2022
  9. github-actions commented on Feb 6, 2022

    @github-actions

    ❌ We're automatically closing this issue due to lack of activity. Please comment if you feel this was done in error.

  10. added
    stale-issue-closed
    on Feb 6, 2022
  11. 8 remaining items

  12. ryankeairns commented on Jun 27, 2025

    @ryankeairns
    ContributorAuthor

    Overall, I would suggest we stick to existing conventions for this component - single color, full height gap/border.

    My initial thinking - need to discuss with EUI devs - is that we could do something simple that essentially is a wrapper of two buttons - one regular, one icon-only - and allow the individual button props to bubble up. Presuming we go this route, the not-full-height border becomes a little trickier though not impossible.

    While I appreciate the use case for considering a different color, I'm personally hesitant to make that a pattern. To this point, our updated button guidelines advise against direct use of semantic-color buttons (or to do so sparingly).

    Avoid direct use of semantic buttons unless they are part of existing EUI components. Direct use of danger (red) buttons is limited to confirming destructive outcomes, like deleting data, to maintain its elevated meaning.
    One could argue this is destructive, but I don't feel stop/cancel quite reaches the bar we're trying to hold.

    Could changing the icon be sufficient?

    🤔
    Lastly, what would happen if the icon-only button displays a popover menu?
    In this state, can you not access it when another query is running?

  13. yanwalton commented on Jun 30, 2025

    @yanwalton

    I'm not a fan of the 'two coloured' split button - we should avoid this... as we're still playing options through we will refine the designs.

    Regarding how split the split button looks, i'm keener on the direction @andreadelrio is moving in... to have it feel more of a complete button on it's own. I prefer the line as a divider rather than two separate buttons put together, as per the 'Close with comment' button below here...

  14. ek-so commented on Jun 30, 2025

    @ek-so
    Contributor

    Hey all! To be quite honest, I on the contrary like a full-height divider for the buttons. The reason is that we're always mixing 2 backgrounds in this case — whether the buttons themselves are the same variants or not, we'll have this weird border in between when one of them is hovered, like a ladder. So the first option looks to me much cleaner, logical (visually) and consistent. Especially for the text buttons, and especially if you put them together with inputs.

    Image

    In the end, those 2 buttons are different and not a one button logically either, because they do different things. They are connected, but it's enough to put them close to clearly indicate this connection (imo). And it should be much easier to implement.

    Not saying if we ever still need them to be a different color (like Figma does here) — it's better not to have a border between red/green directly, and split it with neutral white div.

  15. yanwalton commented on Jun 30, 2025

    @yanwalton

    Yes, I agree @ek-so ... on the examples you show I think v1 makes sense to me.

    And perhaps to clarify what I meant... it should visually feel like one element, even if it has two distinct behaviours for each part.

  16. ek-so commented on Jun 30, 2025

    @ek-so
    Contributor

    ps. Thinking out loud about the case that @andreadelrio mentiones above. It seems to me (again, might be completely subjective perception) that if we need such a difference between the buttons, then maybe they are not "split button" anymore, but rather just 2 different buttons?
    Image
    Because what they actually do, is perform 2 completely different (and even the opposite?) actions.
    Maybe it could be even an indicator for us, whether we should use a "split button" pattern or just buttons close to each other — if they use different variants -> use separate buttons...

  17. yanwalton commented on Jun 30, 2025

    @yanwalton

    We're in danger here of misinterpreting the use case/ need - Let's pause this thinking for a little bit... let's let Laura play the logic through and then we'll make a sync with all here present to go through it in detail.

  18. ryankeairns commented on Jun 30, 2025

    @ryankeairns
    ContributorAuthor

    Nice implementation reference for when we get settled on a design direction:

    https://vercel.com/geist/split-button

  19. l-suarez commented on Jul 1, 2025

    @l-suarez
    Contributor

    Thanks for the proactive approach on this work. The way we need this split button to work might differ from what the component is meant to do. I think we're going to push its boundaries a bit. From my point of view, the design system should provide this component to use when needed but not sure if our use case could be added to its logic. Let's see what you think. I'll be sharing the proposal today at the DnD channel to receive feedback from stakeholders. Will keep this thread updated as there might be new feedback. Thanks again!

  20. ek-so commented on Jul 8, 2025

    @ek-so
    Contributor

    Hey @l-suarez do you have any updates regarding the split button?

  21. ek-so commented on Aug 4, 2025

    @ek-so
    Contributor

    Hey @ryankeairns @yanwalton I'm closing this one, because we have another issue to create a proper thought-through component in EUI. Let's consider this a discovery phase too.

  22. changed the issue type fromtoon Aug 4, 2025
  23. JasonStoltz commented on Aug 25, 2025

    @JasonStoltz
    Contributor

    For posterity, this effort is now being tracked here.

  24. JasonStoltz commented on Jan 7, 2026

    @JasonStoltz
    Contributor
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

design decision

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions