mi6 / mi6/ic-ui-kit

Add vertical alignment option for toggle button groups.

Open
#1,511 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

toggle button group component
Dominant language
TypeScript
Stars
53
Forks
63
Avg merge
2d 4h
Merged PRs (30d)
15

Description

## Summary
Add a prop to toggle button groups that allow its buttons to be aligned vertically or horizontally.

## 💬 Description
To enable toggle button groups to be used on smaller screen sizes, or within smaller containers, the option to change to a vertical alignment would be beneficial.

https://github.com/mi6/ic-ui-kit/issues/748

## 💰 Use value
Makes the component more suitable for more use cases.

## 📝 Acceptance Criteria
If relevant, describe in full detail the different interactions and edge cases that the component or patterns needs to fulfil.

*Given* that a toggle button group is being configured
*When* setting its properties
*Then* an option exists to change the alignment to the following options:
- Horizontal (default) - Buttons are aligned horizontally.
- Vertical - Buttons are stacked top to bottom.

*Given* that a toggle button group is set to vertical alignment
*When* rendered
*Then* the adjacent edges of each toggle button should have square corners
*And* the top and bottom toggle button should have rounded corners on the top and bottom corners respectively.
*And* the same focus behaviour, keyboard navigation, and selection methods should occur.
*And* each toggle button should expand in width to meet the width of the toggle button group.

## ✏ Designs
If there's a Figma design file (or other mock-up), include it here.

## 🧾 Guidance
If there's written guidance or documentation, include a link to it here.

## Additional info
Tell us anything else useful to help us understand your suggestion.

## Related issues
https://github.com/mi6/ic-ui-kit/issues/748

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the toggle button group component and its existing tests or entry point. Review how its properties, focus behavior, keyboard navigation, selection, and button corner styling are implemented; done means adding horizontal and vertical alignment options while preserving the stated default and vertical-layout behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
frontend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.