chuck-norris-fact-element

1.1.2 • Public • Published

Chuck-norris-facts-element

Published on webcomponents.org

Demo

Check it live!

Install

Install the component using NPM:

$ npm install chuck-norris-fact-element --save

Usage

  1. Import polyfill:

    <!-- load webcomponents bundle, which includes all the necessary polyfills -->
    <script src="node_modules/@webcomponents/custom-elements/custom-elements.min.js"></script>
  2. Import custom element:

    <script type="module" src="node_modules/chuck-norris-fact-element/chuck-norris-fact.js"></script>
  3. Start using it!

    Random chuck norris fact:

        <chuck-norris-fact></chuck-norris-fact>

    categorized chuck norris fact:

        <chuck-norris-fact category="animal"></chuck-norris-fact>

Options

Category

Options: animal, career, celebrity, dev, explicit, fashion, food, history, money, movie, music, political, religion, science, sport, travel,

Description: Used to retrieve categorized chuck norris facts.

Development

In order to run it locally you'll need to fetch some dependencies and a basic server setup.

  1. serve:

    $ npm install -g serve
  2. Start development server and open http://localhost:5000/. poly

    $ serve

License

MIT License

Package Sidebar

Install

npm i chuck-norris-fact-element

Weekly Downloads

3

Version

1.1.2

License

MIT

Unpacked Size

122 kB

Total Files

18

Last publish

Collaborators

  • klict