Wondering what’s next for npm?Check out our public roadmap! »

    creepyface-custom-element

    8.1.0 • Public • Published

    Creepyface Custom Element · npm version

    Creepyface Custom Element is a Creepyface wrapper that registers the creepy-face custom element.

    Usage

    <script src="https://unpkg.com/creepyface-custom-element"></script>
    
    <img
      is="creepy-face"
      src="https://creepyface.io/img/0/serious"
      data-src-hover="https://creepyface.io/img/0/hover"
      data-src-look-0="https://creepyface.io/img/0/0"
      data-src-look-45="https://creepyface.io/img/0/45"
      data-src-look-90="https://creepyface.io/img/0/90"
      data-src-look-135="https://creepyface.io/img/0/135"
      data-src-look-180="https://creepyface.io/img/0/180"
      data-src-look-225="https://creepyface.io/img/0/225"
      data-src-look-270="https://creepyface.io/img/0/270"
      data-src-look-315="https://creepyface.io/img/0/315"
    />

    Run this example on codepen.

    Note: For browsers like Safari you need to add a polyfill to support custom builtin elements. ungap/custom-elements-builtin works like a charm.

    Check out the stories for working examples.

    Developing

    • yarn dev will spin up the storybook.
    • yarn build will generate the production scripts under the dist folder.

    Install

    npm i creepyface-custom-element

    DownloadsWeekly Downloads

    37

    Version

    8.1.0

    License

    MIT

    Unpacked Size

    14.2 kB

    Total Files

    11

    Last publish

    Collaborators

    • avatar