3.0.2 • Published 5 years ago

@elifent/paper-avatar v3.0.2

Weekly downloads
3
License
ISC
Repository
github
Last release
5 years ago

\<paper-avatar>

Element to display circular avatars

Installation

npm install --save @elifent/paper-avatar

In an html file

<html>
  <head>
    <script type="module">
      import "@elifent/paper-avatar/paper-avatar.js";
    </script>
  </head>
  <body>
    <paper-avatar
      img="https://picsum.photos/id/1027/200"
      elevation="3"
    ></paper-avatar>
  </body>
</html>

In a Polymer 3 element

import { PolymerElement, html } from "@polymer/polymer";
import "@elifent/paper-avatar/paper-avatar.js";
class SampleElement extends PolymerElement {
  static get template() {
    return html`
      <paper-avatar
        img="https://picsum.photos/id/1027/200"
        elevation="3"
      ></paper-avatar>
    `;
  }
}
customElements.define("sample-element", SampleElement);

Installation

  git clone https://github.com/elifent/paper-avatar
  cd paper-avatar
  npm install
  npm install -g polymer-cli

Running the demo locally

  polymer serve --npm
  open http://127.0.0.1:<port>/components/paper-avatar/demo/

Found issues? Let me know