4.3.1 • Published 3 years ago

vue-weather-widget v4.3.1

Weekly downloads
157
License
Apache-2.0
Repository
github
Last release
3 years ago

Vue Weather Widget

vue 2x npm npm download per month Libraries.io dependency status for latest release NPM license

Weather widget inspired by forecast embeds and powered by OpenWeatherMap and DarkSky API.

Demo

Browser preview

Preview

Install

NPM

npm i vue-weather-widget

YARN

yarn add vue-weather-widget

API Keys

This component works with both the DarkSky API, and the OpenWeatherMap API. Since it is no longer possible to create a DarkSky API key, it is recommended to use OpenWeatherMap.

Generate new API key from https://openweathermap.org/appid

Usage

<template>
  <!-- Open Weather Map -->
  <vue-weather
    api-key="<your-open-weather-map-api-key>"
    units="uk"
    latitude="24.8864"
    longitude="91.8807"
  />

  <!-- Dark Sky API -->
  <vue-weather
    use-dark-sky-api
    api-key="<your-dark-sky-api-key>"
    units="uk"
    latitude="24.8864"
    longitude="91.8807"
  />
</template>

<script>
  import VueWeather from "vue-weather-widget";

  export default {
    components: {
      VueWeather,
    },
  };
</script>

Props

PropsTypeDefaultDescription
api-keyString (required)-Your OpenWeatherMap or Dark Sky API key
use-dark-sky-apiBooleanfalseUse DarkSky API instead of OpenWeatherMap
latitudeStringcurrentThe latitude of a location (By default, it will use IP to find location)
longitudeStringcurrentThe longitude of a location (By default, it will use IP to find location)
languageString"en"A list of supported languages are given below.
unitsString"us"A list of supported units are given below.
hide-headerBooleanfalseWhether to show or hide the title bar.
update-intervalNumbernullInterval in milliseconds to update weather data periodically. Set it to 0 or null to disable autoupdate.
disable-animationBooleanfalseUse static icons when enabled.
bar-colorString"#444"Color of the Temparature bar.
text-colorString"#333"Color of the text.
ipregistry-keyString"f8n4kqe8pv4kii"Your ipregistry key to get current location from IP address
<!--addressStringcurrentAn address of a location (By default, it will use IP to find address)-->
<!--positionstack-apiString"7f9c71310f410847fceb9537a83f3882"You positionstack api key for geocoding. (Required when using https)-->

Slots

NameDescription
headerThe header component
titleThe title inside the header
loadingComponent to display while loading
errorComponent to display on error

Supported units

List of supported units:

  • auto: automatically select units based on geographic location
  • ca: same as si, except that windSpeed and windGust are in kilometers per hour
  • uk: same as si, except that nearestStormDistance and visibility are in miles, and windSpeed and windGust are in miles per hour
  • us: Imperial units (the default)
  • si: SI units

Supported languages

  • ar: Arabic
  • az: Azerbaijani
  • be: Belarusian
  • bg: Bulgarian
  • bs: Bosnian
  • ca: Catalan
  • cs: Czech
  • de: German
  • el: Greek
  • en: English (which is the default)
  • es: Spanish
  • et: Estonian
  • fr: French
  • hr: Croatian
  • hu: Hungarian
  • id: Indonesian
  • it: Italian
  • is: Icelandic
  • ka: Georgian
  • kw: Cornish
  • nb: Norwegian Bokmål
  • nl: Dutch
  • pl: Polish
  • pt: Portuguese
  • ru: Russian
  • sk: Slovak
  • sl: Slovenian
  • sr: Serbian
  • sv: Swedish
  • tet: Tetum
  • tr: Turkish
  • uk: Ukrainian
  • x-pig-latin: Igpay Atinlay
  • zh: simplified Chinese
  • zh-tw: traditional Chinese
4.3.1

3 years ago

4.3.0

3 years ago

4.2.4

3 years ago

4.2.3

3 years ago

4.2.2

4 years ago

4.1.0

4 years ago

4.2.1

4 years ago

4.2.0

4 years ago

4.0.4

4 years ago

4.0.3

4 years ago

4.0.2

4 years ago

4.0.1

4 years ago

4.0.0

4 years ago

3.0.6

4 years ago

3.0.5

4 years ago

3.0.4

4 years ago

3.0.3

4 years ago

3.0.2

4 years ago

3.0.0

4 years ago

2.4.3

4 years ago

2.4.2

4 years ago

2.4.4

4 years ago

2.4.0

4 years ago

2.1.7

5 years ago

2.1.6

5 years ago

2.1.5

5 years ago

2.1.3

6 years ago

2.1.1

6 years ago

2.1.0

6 years ago

2.0.2

6 years ago

2.0.1

6 years ago

2.0.0

6 years ago

1.2.1

6 years ago

1.2.0

6 years ago

1.1.0

6 years ago

1.0.3

7 years ago

1.0.2

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago

0.5.0

7 years ago

0.4.1

7 years ago

0.4.0

7 years ago

0.3.1

7 years ago

0.3.0

7 years ago