Calm motion: animations on this site only fade, with no movement
Weather forecast
The weather now and for the next days, with the high, the low, and the rain
Shows the weather of one place in a weather app, a travel site, or an event page. The data comes from your weather service.
Basic
Jakarta
31°C
Partly cloudy
- Feels like
- 36°C
- Humidity
- 74%
- Wind
- 12 km/h
- TueThunderstorm80% rainlow 25°C, high 32°C
- WedRain65% rainlow 25°C, high 31°C
- ThuPartly cloudy20% rainlow 26°C, high 33°C
- FriClearlow 26°C, high 34°C
- SatCloudy10% rainlow 25°C, high 32°C
place,temp, andweathergive the weather now.feels-like,humidityin percent, andwindin km/h are optional.weatherisclear,partly-cloudy,cloudy,rain,storm,snow, orfog. Each has an icon and a word.daysis the list of days. Each day has adateas YYYY-MM-DD, aweather, ahigh, alow, and an optionalrainchance in percent.- A bar shows the range of each day against the whole week, so warm and cool days are easy to see. Screen readers hear the weather word and "low 25°C, high 32°C".
unitiscelsius(default) orfahrenheit. Give the numbers in that unit.localeformats the numbers and the names of the days.- Change the words with
labelsor a label pack. The API table lists the keys.
Usage
ts
import { BlessWeatherForecast } from "blessing-ui";API
Props
| Name | Type | Default | Description |
|---|---|---|---|
place* | string | — | |
temp* | number | — | the temperature now, in the unit of `unit` |
weather* | BlessWeather | — | |
feelsLike | number | — | |
humidity | number | — | |
wind | number | — | the wind speed in kilometers per hour |
days | BlessWeatherDay[] | [] | |
unit | "celsius" | "fahrenheit" | "celsius" | |
locale | string | "en" | |
labels | Partial<Record<BlessWeather, string> & { feelsLike: string; humidity: string; wind: string; days: string; rainOf: (pct: string) => string; range: (low: string, high: string) => string; }> | — |