mui / mui/material-ui

[Collapse] Support flexbox

Open
#47,700 7 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

component: Collapse has workaround type: enhancement
Dominant language
JavaScript
Stars
99.1k
Forks
32.5k
Avg merge
2d 17h
Merged PRs (30d)
106

Description

Summary

I expect Collapse to be able to handle flexbox layout transition.

Examples

https://stackblitz.com/edit/github-nb4cly3i?file=src%2FApp.tsx

In the example there are 3 columns, the left one is collapsed.
Hit the Collapse/FlexCollapse button to toggle which component is used.
Hit the Open/Close button to see the transition in action.
Change the flex input.

Motivation

Using Collapse in a flexbox is not supported/behave unexpectedly

Search keywords: collapse, flex, flexbox

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 with the linked StackBlitz example and compare the Collapse and FlexCollapse behavior while changing the flex input. Then locate the Collapse component implementation and its related tests. Done means flexbox layouts transition predictably without the unexpected behavior shown in the example.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, react
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.