Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New component: Button Group #682

Open
FrankieBortot opened this issue Oct 30, 2024 · 3 comments
Open

New component: Button Group #682

FrankieBortot opened this issue Oct 30, 2024 · 3 comments
Labels
Button component Button component and hooks related activities enhancement New feature or request new component

Comments

@FrankieBortot
Copy link
Contributor

I suggest the creation of the new component "Button Group", which will act as a container for multiple buttons in a predefined layout.
This component allows us to ensure consistency of UI, letting us define a specific layout when multiple buttons are put together.

@FrankieBortot FrankieBortot added enhancement New feature or request new component Button component Button component and hooks related activities labels Oct 30, 2024
@Danielecina
Copy link
Member

Hi @FrankieBortot, can you show some inspirational images? the proposal seems like something like this
Screenshot 2024-10-30 alle 16 58 44

@FrankieBortot
Copy link
Contributor Author

Hi @FrankieBortot, can you show some inspirational images? the proposal seems like something like this Screenshot 2024-10-30 alle 16 58 44

Sure! Here are some examples from other Design Systems:

It's mainly used for layout, there are no changes affecting the base component style

@GiovannaMonti
Copy link
Member

GiovannaMonti commented Oct 30, 2024

Hi, just to give more insight into this issue, we discussed possible strategies to graphically organize groups of components in a consistent way. The chosen strategy should apply to the internal development of components inside the design system as well as external usage.

On the internal side, design-system components like Modal, Drawer or Card can render groups of buttons. Right now, these components adopt different approaches to do so (e.g. they can demand an array of actions, which are then turned into buttons, or they can ask for a generic extra property to be filled with react nodes, among which there can be buttons). The idea is that they all start using the same interface for rendering actions (to be defined!), and under the hood the ButtonGroup should be used.

On the external side, design-system users (developers using DS components for their own project) might find it useful to have a ButtonGroup component at hand, for example if they are working on custom containers that should render groups of buttons. Providing them with a ready-to-use ButtonGroup component allows us to guarantee better graphical integration between their custom implementations and our design-system components.

Note: if we were just to focus on the internal side, the ButtonGroup component would not necessarily be the go-to option, because there are infinite ways to structure and abstract component layouts. However, since we think this type of component could be useful to external users, we decided to go with this solution.

Once this solution is discussed and approved, when we implement the ButtonGroup component we must also update the aforementioned component interfaces (Modal, Card, Drawer) to use it internally.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Button component Button component and hooks related activities enhancement New feature or request new component
Projects
None yet
Development

No branches or pull requests

3 participants