Giter Site home page Giter Site logo

andregoncalves / stencil-skycons Goto Github PK

View Code? Open in Web Editor NEW
1.0 2.0 0.0 131 KB

st-skycons is a web component built with Stencil that allows you to use the Skycons weather icons as web component

License: MIT License

TypeScript 90.61% HTML 8.67% JavaScript 0.72%
stencil skycons-weather-icons jsx webcomponents

stencil-skycons's Introduction

Built With Stencil

st-skycons

st-skycons is a web component built with Stencil that allows you to use the Skycons weather icons.

Demo

Getting Started

To try this component:

git clone [email protected]:andregoncalves/stencil-skycons.git skycons
cd skycons
git remote rm origin

and run:

npm install
npm start

Using this component

Script tag

  • Put <script src='https://unpkg.com/stencil-skycons@latest/dist/skycons.js'></script> in the head of your index.html
  • Then you can use the component

Node Modules

  • Run npm install stencil-skycons --save
  • Put a script tag similar to this <script src='node_modules/stencil-skycons/dist/skycons.js></script> in the head of your index.html
  • Then you can use the element <st-skycons> anywhere in your template, JSX, html etc

In a stencil-starter app

  • Run npm install stencil-skycons --save
  • Add { name: 'stencil-skycons' } to your collections
  • Then you can use the element <st-skycons> anywhere in your template, JSX, html etc

Parameters

Attribute Default Description
width 64 Canvas width
height 64 Canvas height
icon '' The icon, see available icons below
color black The icon color
autoplay true The animation auto starts

Methods

You can change the icon, play and pause the animation:

element = document.querySelector('st-skycons');
element.setAttribute('icon', 'RAIN');
element.pause();
element.play();

Available Icons

'CLEAR_DAY'
'CLEAR_NIGHT'
'PARTLY_CLOUDY_DAY'
'PARTLY_CLOUDY_NIGHT'
'CLOUDY'
'RAIN'
'SLEET'
'SNOW'
'WIND'
'FOG'

stencil-skycons's People

Contributors

andregoncalves avatar

Stargazers

 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.