0

I need to create horizontal and vertical tabs using Angular material.Thanks in advance.

1 Answers1

0

I use the following SCSS to display a mat-tab-group as vertical by applying the vertical-tabs class. You will probably want to alter it somewhat but it should be a good starting point.

mat-tab-group.vertical-tabs {
        flex-direction: row !important;

        .mat-tab-labels {
            flex-direction: column !important;
        }

        .mat-tab-label {
            border: none;
            height: auto !important;
            padding: 10px !important;
            min-width: 0px !important;
            justify-content: left !important;
            opacity: 1;
            border-bottom: 1px solid #eee;
        }

        .mat-tab-body-wrapper {
            flex: 1;
        }

        .mat-tab-header {
            border-bottom: none !important;
            border-right: 1px solid #eee;
        }

        mat-ink-bar {
            display: none;
        }
    }
robbieAreBest
  • 1,601
  • 14
  • 16