Number of future hours to forecast. Must be between 1 (inclusive) and 12 (inclusive).
days
Number
4
Number of future days to forecast. Must be between 1 (inclusive) and 4 (inclusive).
locale
String
en-US
Locale of weather summaries
Weather API source
Source
Value
Dark Sky
0
AccuWeather
1
Weatherbit
2
API key
Source
Default value
Dark Sky
process.env.REACT_APP_DARK_SKY_API_KEY
AccuWeather
process.env.REACT_APP_ACCU_WEATHER_API_KEY
Weatherbit
process.env.REACT_APP_WEATHER_BIT_API_KEY
ā Note that you are not allowed to make Dark Sky API calls from client-facing code. However, it is possible to use it native applications such as Electron.
<Weather.Currently /> props
Name
Type
Required
Default value
Description
width
Number
Yes
Width of this component in pixels
height
Number
Yes
Height of this component in pixels
location
String
No
A string representing the weather location
summaryCurrently
String
No
A string that summaries the current weather condition
summaryToday
String
No
A string that summaries the weather today
iconId
String or Number
No
A weather source specific string or number representing the weather icon
iconType
Number
No
0 (Dark Sky)
The weather source type
temperature
Number
No
The current temperature
temperatureHigh
Number
No
The expected maximum temperature of today
temperatureLow
Number
No
The expected minimum temperature of today
humidity
Number
No
The current humidity
windSpeed
Number
No
The current average wind speed
uvIndex
Number
No
The current UV index
unit
String
No
si
The unit of the values supplied to this component
<Weather.Hourly /> props
Name
Type
Required
Default value
Description
className
String
No
A string representing the name of CSS style to apply to this component
width
Number
Yes
Width of this component in pixels
height
Number
Yes
Height of this component in pixels
hourly
Object array
No
The hourly object array returned by calling getWeather()
chartLabel
String
No
Hourly forecast
A string representing the hourly weather chart title
iconType
Number
No
0 (Dark Sky)
The weather source type
temperatureLabel
String
No
š”
The prefix prepended to temperatureHigh and temperatureLow in tooltip
humidityLabel
String
No
š¢
The prefix prepended to humidity
precipitationLabel
String
No
š§
The prefix prepended to precipProbability and precipIntensity
windSpeedLabel
String
No
šØ
The prefix prepended to windSpeed in tooltip
windSpeedSuffix
String
No
km/h
The suffix appended to windSpeed; typically you could use km/h
uvIndexLabel
String
No
ā
The prefix prepended to uvIndex in tooltip
additionalForecast
String
No
humidity
Show additional weather information as the 3rd line in the weather chart
unit
String
No
si
The unit of the values supplied to this component
timeFormat
String
No
ha
A string representing the hour format
<Weather.Daily /> props
Name
Type
Required
Default value
Description
orientation
String
No
horizontal
The layout of this component, either horizontal or vertical
date
Number
No
The weather date used to display the weekday
summary
String
No
A string representing the expected weather condition of this day
iconId
String or Number
No
A weather source specific string or number representing the weather icon
iconType
Number
No
0 (Dark Sky)
The weather source type
temperatureHigh
Number
No
The expected maximum temperature of this day
temperatureHighLabel
String
No
š„
The prefix prepended to temperatureHigh
temperatureLow
Number
No
The expected minimum temperature of this day
temperatureLowLabel
String
No
ā
The prefix prepended to temperatureLow
temperatureLabel
String
No
š”
The prefix prepended to temperatureHigh and temperatureLow in tooltip
humidity
Number
No
The expected humidity of this day
humidityLabel
String
No
š¢
The prefix prepended to humidity
precipProbability
Number
No
The probability of having any precipitation on this day
precipIntensity
Number
No
The expected precipitation intensity of this day
precipLabel
String
No
š§
The prefix prepended to precipProbability and precipIntensity
windSpeed
Number
No
The expected wind speed of this day
windSpeedLabel
String
No
šØ
The prefix prepended to windSpeed in tooltip
windSpeedSuffix
String
No
The suffix appended to windSpeed; typically you could use km/h