question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

💡 Proposal - Divided button component for v4

See original GitHub issue

Divided button component for v4

The problem

Hey everyone! I would like to discuss with you the introduction of the new component in v4. It’s a more complex variant of the button.

Screenshot 2021-07-08 at 12 51 48

The button is already created as a custom component in production, it might be something that we would like to include in the library.

The proposed solution

The component contains 2 buttons with 2 different actions, one opening the dropdown

Screenshot 2021-07-09 at 10 01 12

I guess props would be the same as in the case of the button, except for a couple of them, like isDropdown

Open questions

Naming of the component:

  • ButtonDivided
  • ButtonSplitted
  • ButtonWithDropdown
  • ???

Breaking changes

v4

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:6 (5 by maintainers)

github_iconTop GitHub Comments

3reactions
suevalovcommented, Jul 9, 2021

I’d rather make it a composition of buttons:

<ButtonGroup>
   <Button>Click</Button>
   <Button>v</Button>
</ButtonGroup>

ButtonGroup can apply different variants:

  1. padded - applies equal spacing between all buttons
  2. combined - squashes button together into one group (as it’s captured on the screenshot)
1reaction
domarkucommented, Jul 9, 2021

Possibly a bigger question, more of a design nature, but would it make sense to extend this proposal and implement as a button group? We could have multiple, e.g. up to three, buttons together and optionally with a dropdown.

Screen Shot 2021-07-09 at 17 03 01

Read more comments on GitHub >

github_iconTop Results From Across the Web

Contribution: combo button · Issue #3371 · carbon-design ...
Name: Contextual menu Combo button Research: We have three actions a user can take to complete their tasks from our local navigation.
Read more >
Building a split-button component - web.dev
Split buttons are buttons that conceal a primary button and a list of additional buttons. They're useful for exposing a common action while ......
Read more >
How to Build a Powerful and Production-Ready Tailwind Button
Building an easy-to-use component can be tricky. Types must be respected, props must be implemented. This article explains it all!
Read more >
Design: Differentiate trigger jobs from regular jobs in the pipeline ...
It should be easy to identify the trigger job from the UI in all pages where a trigger job shows up, without unnecessarily...
Read more >
React Button Group component - Material UI - MUI
Basic button group. The buttons can be grouped by wrapping them with the ButtonGroup component. They need to be immediate children.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found