Giter VIP home page Giter VIP logo

paper-tabs's Introduction

Build status

Demo and API docs

##<paper-tabs>

Material design: Tabs

paper-tabs makes it easy to explore and switch between different views or functional aspects of an app, or to browse categorized data sets.

Use selected property to get or set the selected tab.

Example:

<paper-tabs selected="0">
  <paper-tab>TAB 1</paper-tab>
  <paper-tab>TAB 2</paper-tab>
  <paper-tab>TAB 3</paper-tab>
</paper-tabs>

See paper-tab for more information about paper-tab.

A common usage for paper-tabs is to use it along with iron-pages to switch between different views.

<paper-tabs selected="{{selected}}">
  <paper-tab>Tab 1</paper-tab>
  <paper-tab>Tab 2</paper-tab>
  <paper-tab>Tab 3</paper-tab>
</paper-tabs>

<iron-pages selected="{{selected}}">
  <div>Page 1</div>
  <div>Page 2</div>
  <div>Page 3</div>
</iron-pages>

To use links in tabs, add link attribute to paper-tab and put an <a> element in paper-tab.

Example:


<style is="custom-style">
  .link {
    @apply(--layout-horizontal);
    @apply(--layout-center-center);
  }
</style>

<paper-tabs selected="0">
  <paper-tab link>
    <a href="#link1" class="link">TAB ONE</a>
  </paper-tab>
  <paper-tab link>
    <a href="#link2" class="link">TAB TWO</a>
  </paper-tab>
  <paper-tab link>
    <a href="#link3" class="link">TAB THREE</a>
  </paper-tab>
</paper-tabs>

Styling

The following custom properties and mixins are available for styling:

Custom property Description Default
--paper-tabs-selection-bar-color Color for the selection bar --paper-yellow-a100
--paper-tabs Mixin applied to the tabs {}

##<paper-tab>

paper-tab is styled to look like a tab. It should be used in conjunction with paper-tabs.

Example:

<paper-tabs selected="0">
  <paper-tab>TAB 1</paper-tab>
  <paper-tab>TAB 2</paper-tab>
  <paper-tab>TAB 3</paper-tab>
</paper-tabs>

Styling

The following custom properties and mixins are available for styling:

Custom property Description Default
--paper-tab-ink Ink color --paper-yellow-a100
--paper-tab Mixin applied to the tab {}
--paper-tab-content Mixin applied to the tab content {}
--paper-tab-content-unselected Mixin applied to the tab content when the tab is not selected {}

This element applies the mixin --paper-font-common-base but does not import paper-styles/typography.html. In order to apply the Roboto font to this element, make sure you've imported paper-styles/typography.html.

paper-tabs's People

Contributors

abdonrd avatar addyosmani avatar bicknellr avatar blasten avatar cdata avatar chuckh avatar dfreedm avatar ebidel avatar frankiefu avatar fredj avatar gabiaxel avatar harsimranmaan avatar jklein24 avatar justinfagnani avatar keanulee avatar kevinpschaaf avatar motss avatar notwaldorf avatar ortham avatar rictic avatar robdodson avatar robrez avatar sorvell avatar ssorallen avatar tedium-bot avatar tjsavage avatar tyriar avatar valdrinkoshi avatar waverleydesign avatar wiltzius avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.