[List] support "expand and collapse" from List spec #14994
Labels
area: material/expansion
area: material/list
feature
This issue represents a new feature or feature request rather than a bug or bug fix
needs: discussion
Further discussion with the team is needed before proceeding
P5
The team acknowledges the request but does not plan to address it, it remains open for discussion
Please describe the feature you would like to request.
The List spec includes an "Expand and collapse" control. This functions more or less like an Expansion Panel but with List Item styling: dividers are used instead of a surrounding border / different background color, and the expand/collapse button is placed according to the rules for secondary action buttons.
What is the use-case or motivation for this proposal?
Support full capabilities of List as described in the spec
Is there anything else we should know?
I put together a StackBlitz showing the current behavior when an expansion panel is placed in a list. The behavior is more or less as expected but the styling does not work as a list item, and just "fixing up" the current behavior is a lot to ask of consumers.
In my own project I built a component to implement this behavior, but it's not going to be as robust as it would be if supported directly here. Of course, styling an expansion panel to behave correctly when used as a list item is only one approach, and I don't mean to suggest a specific design. My custom component tracks its own expansion state and handles divider logic, etc, internally.
The text was updated successfully, but these errors were encountered: