Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to move Mat expansion indication?

Is it possible to move the mat expansion indicator (Angular, Material Design) to set it before the title ?

No informations about that on material documentation https://material.angular.io/components/expansion/overview

enter image description here

Thank you :)

like image 300
Joe Allen Avatar asked Dec 11 '22 09:12

Joe Allen


2 Answers

you can always override default style.

.mat-expansion-panel-header {
  flex-direction: row-reverse;

  .mat-content {
    padding-left: 12px;
  }
}
like image 59
Mike Trinh Avatar answered Dec 23 '22 16:12

Mike Trinh


You can easily do this with the following code!

<mat-accordion>
        <mat-expansion-panel [togglePosition]="'before'">
          <mat-expansion-panel-header >
            <mat-panel-title>

            </mat-panel-title>

          </mat-expansion-panel-header>

        </mat-expansion-panel>
</mat-accordion>

Just add [togglePosition]=" 'before' "

like image 38
nipun-kavishka Avatar answered Dec 23 '22 18:12

nipun-kavishka