Problem:
expansion-panel
, it should expand upwards to show more info rather than expanding down which makes user to scroll down again.If you are using Angular Material Component's Expansion Panel,
then you can use the following css
for making the expansion-panel
content to be present above the mat-expansion-panel-header
in styles.css
file.
.mat-expansion-panel {
display: flex !important;
flex-direction: column;
}
.mat-expansion-panel-header {
order: 2;
}
StackBlitz - Angular Material Demo
Update 1 : React's Material UI Demo
If you dont mind panel moving header upwards after expantion, you could dock whole expansion panel / accordeon to bottom and use absolute positioning.
https://stackblitz.com/edit/angular-b11huf?embed=1&file=app/expansion-overview-example.css
However keep in mind that panel title, header and description order is important for correct displaying expansion panel and displaying just header at the bottom all the times is going to be painfull. Good Luck.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With