Tutorialsplane

Angular Material Tabs


Angular Material Tabs: The directive md-tabs is used to create tabs in Angular Material. It works as container for the child elements md-tab. Here in this tutorial we are going to explain how you can create tabs in Angular Material. You can also use our online editor to edit and run the code online.


Angular Material Tabs Example

Let us first create a simple tab using the md-tabs and md-tab directive.

Angular Material Tabs Example:

<md-tabs md-dynamic-height="" md-border-bottom="">
      <md-tab label="one">
        <md-content class="md-padding">
          <h1 class="md-display-2">Tab One</h1>
          <p> Tab One - Dummy Text content for 1.</p>
        </md-content>
      </md-tab>
      <md-tab label="two">
        <md-content class="md-padding">
          <h1 class="md-display-2">Tab Two</h1>
          <p> Tab Two - Dummy Text content for 2.</p>
        </md-content>
      </md-tab>
      <md-tab label="three">
        <md-content class="md-padding">
          <h1 class="md-display-2">Tab Three</h1>
          <p> Tab Three - Dummy Text content for 3 .</p>
        </md-content>
      </md-tab>
  </md-tabs>
Try It On →

If you run the above example it will produce output something like this –

Attributes

Following Attributes are available which are useful when working with tabs.

Learn Angular Material