mariem_11
mariem_11

Reputation: 91

how to change Angular mat-expansion-panel direction

I'm using angular material component "mat-expansion-panel". the default opening direction for this component is down. i want the panel to open in different directions (left, right, up) how can i do that.

Upvotes: 2

Views: 4962

Answers (2)

Oleg Abrazhaev
Oleg Abrazhaev

Reputation: 2859

Just do something like that

    <p>Main text</p>
    @if (showFiller) {
      <p>Extra Lorem, ipsum dolor sit amet consectetur.</p>
    }
    <button (click)="showFiller = !showFiller" mat-raised-button>
      Toggle extra text
    </button>

Upvotes: 0

Mahipal Choudhary
Mahipal Choudhary

Reputation: 405

There are only one way to open mat-expansion-panel. Its default nature is open down side as drop down works. But if you want to open it left or right side then you can use side bar.

https://material.angular.io/components/sidenav/examples

Upvotes: 1

Related Questions