Skip to content

masonlouchart/poly-badge

Repository files navigation

<poly-badge>

<poly-badge> is a badge to display a count or a tiny label. Pure Polymer component.

Maintained by Mason Louchart.

Demo & Doc

See the Component Page

Usage

  1. Install The Component:

    bower install poly-badge --save
  2. Import Custom Element:

    <link rel="import" href="PATH/TO/BOWER/COMPONENTS/poly-badge/poly-badge.html">
  3. Start using it!

    <poly-badge>5</poly-badge>
    <poly-badge>Hello</poly-badge>
    <poly-badge wide>42</poly-badge>
    <poly-badge elevation="1">Shadow is added</poly-badge>
    <poly-badge info></poly-badge>
    <poly-badge color="white" bgc="black">Black & White</poly-badge>
    ...

Options

Attribute Description
wide Adapts the badge for a larger text
elevation Add a shadow
info Is an info marker
warning Is a warning marker
error Is an error marker
color Set the text color
bgc Set the background color
xs Set the font-size to 0.7em
s Set the font-size to 0.8em
l Set the font-size to 1.2em
xl Set the font-size to 1.4em

There are no required options!

Contributing

  1. Fork it!
  2. Create your feature branch: git checkout -b my-new-feature
  3. Commit your changes: git commit -m 'Add some feature'
  4. Push to the branch: git push origin my-new-feature
  5. Submit a pull request :D

Don't forget add your name into the CONTRIBUTORS.txt file.

License

Apache License 2.0

About

Little badge element based on Polymer

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages