Explore the temperature over the next few hours and see the sky, feels-like temperature and precipitation chance change along the forecast.
Hourly Weather Outlook · Preview
Loading widget…
Preparing integration examples…
Source under review
The source code and files will be available after this version passes review.
Idle
API contract
Props for integrating the React component in your app.
citystring (optional)
Location shown in the header.
hoursreadonly WeatherHour[] | null (optional)
Ordered local-time records with a temperature and condition. Each can include a stable ID, kind, feels-like temperature and precipitation chance. Pass null for an unavailable feed or omit to show sample data.
unitWeatherTemperatureUnit (optional)
Unit of supplied temperatures. Defaults to "°F".
selectedHourIdstring (optional)
Controls selection by the hour's ID, or by time when no ID was provided. Defaults to the first usable hour.
onHourChange(hour: WeatherHour) => void
Called when a different hour is requested. Update selectedHourId to confirm a controlled selection.
Data and integration
Preview
A sample afternoon in Tern Bay. The sky shifts from sun and clouds to showers, then a clear night.
Inputs
Supply the city and chronological hourly records. Start with the current observation when available. Each record must have a local display time, a finite temperature and a WeatherCondition. Optional fields include a stable id, kind (observation or forecast), feelsLike in the same unit, and precipitationPercent from 0 to 100.
Source options
Format the provider's timestamps in the location's time zone. Use the original timestamp as the stable ID, especially when local hour labels repeat. Map codes to sunny, partly-cloudy, cloudy, rain, clear (night), fog, snow or thunderstorm. The host fetches and refreshes the forecast.
Actions
Drag or press the forecast slider, or select an hour with the arrow keys, Home and End. The selected ID is retained across feed updates while it remains available. Selection falls back to the first usable hour when the selected record is removed.
Integration requirements
Keep one temperature unit across all records. The widget draws an evenly spaced trend in the supplied order and rounds displayed readings to whole numbers. It skips invalid records and keeps the first record per ID or time label. Use null for a missing optional measurement or an unavailable feed, and [] for an empty forecast. Only omitted hours enable sample data. Serve the included artwork under /illustrations/weather. The widget uses still images with reduced motion and falls back to a condition icon when artwork is unavailable.