222 weather themed icons for JWebMP applications — the only icon font dedicated to weather, maritime, and meteorological imagery. CSS web font rendering with wi- class prefix.
Built on Weather Icons · Angular 21 · JWebMP Core · JPMS module com.jwebmp.plugins.weathericons · Java 25+
Version: 2.2 — Complete weather icon set with type-safe Java enum API.
<dependency>
<groupId>com.jwebmp.plugins</groupId>
<artifactId>weather-icons</artifactId>
<version>2.0.0-SNAPSHOT</version>
</dependency>Gradle (Kotlin DSL)
implementation("com.jwebmp.plugins:weather-icons:2.0.0-SNAPSHOT")- 222 Weather Themed Icons — The only icon font dedicated to weather
- Day & Night Conditions — Sunny, cloudy, rain, snow, thunderstorm for both day and night
- Moon Phases — 28 moon phase icons plus 28 alternate variants
- Wind System — Beaufort scale (0–12), compass directions (16), degree-based directions (16 × 2)
- Natural Disasters — Earthquake, fire, flood, tornado, hurricane, tsunami, volcano
- Measurement — Thermometer, barometer, humidity, Celsius, Fahrenheit, degrees
- Celestial — Sunrise, sunset, moonrise, moonset, horizon, solar/lunar eclipse
- Type-Safe Java Enum API —
WeatherIconenum with compile-time safety - CRTP Fluent API —
WeatherIcons<J>component with type-safe method chaining - Zero Configuration — Auto-registered via ServiceLoader SPI
- Java 25 LTS (required)
- Maven 3.8+
- Node.js 18+ (for frontend builds)
- Angular 21+ (auto-integrated via JWebMP)
import com.jwebmp.plugins.weathericons.WeatherIcons;
import com.jwebmp.plugins.weathericons.WeatherIcon;
// Sunny day
var sunny = new WeatherIcons<>(WeatherIcon.day_sunny);
// Night clear
var night = new WeatherIcons<>(WeatherIcon.night_clear);
// Rain
var rain = new WeatherIcons<>(WeatherIcon.rain);
// Wind direction
var wind = new WeatherIcons<>(WeatherIcon.towards_n);
// Temperature
var temp = new WeatherIcons<>(WeatherIcon.thermometer);// Day Conditions (22 icons)
WeatherIcon.day_sunny, WeatherIcon.day_cloudy, WeatherIcon.day_rain
WeatherIcon.day_snow, WeatherIcon.day_thunderstorm, WeatherIcon.day_fog
// Night Conditions (26 icons)
WeatherIcon.night_clear, WeatherIcon.night_cloudy, WeatherIcon.night_rain
WeatherIcon.night_snow, WeatherIcon.night_thunderstorm
// General Weather (18 icons)
WeatherIcon.cloud, WeatherIcon.cloudy, WeatherIcon.fog, WeatherIcon.rain
WeatherIcon.snow, WeatherIcon.hail, WeatherIcon.lightning
// Natural Disasters
WeatherIcon.earthquake, WeatherIcon.fire, WeatherIcon.flood
WeatherIcon.tornado, WeatherIcon.hurricane, WeatherIcon.tsunami, WeatherIcon.volcano
// Moon Phases (56 icons)
WeatherIcon.moon_new, WeatherIcon.moon_full, WeatherIcon.moon_first_quarter
WeatherIcon.moon_waxing_crescent_1 ... WeatherIcon.moon_waxing_crescent_6
// Wind Beaufort Scale (13 icons)
WeatherIcon.wind_beaufort_0 ... WeatherIcon.wind_beaufort_12
// Wind Compass Direction (32 icons)
WeatherIcon.towards_n, WeatherIcon.towards_ne, WeatherIcon.towards_e ...
WeatherIcon.from_n, WeatherIcon.from_ne, WeatherIcon.from_e ...
// Measurement
WeatherIcon.thermometer, WeatherIcon.barometer, WeatherIcon.humidity
WeatherIcon.celsius, WeatherIcon.fahrenheit, WeatherIcon.degrees
// Celestial
WeatherIcon.sunrise, WeatherIcon.sunset, WeatherIcon.moonrise, WeatherIcon.moonset
WeatherIcon.horizon, WeatherIcon.solar_eclipse, WeatherIcon.lunar_eclipsesrc/main/java/com/jwebmp/plugins/weathericons/
├── WeatherIcons.java # CRTP icon component (italic-based)
├── WeatherIcon.java # Enum with 222 icon constants
├── WeatherIconsPageConfigurator.java # Auto-registration via ServiceLoader
└── implementations/
├── WeatherIconsInclusionModule.java
└── WeatherExclusionsModule.java
public class WeatherIcons<J extends WeatherIcons<J>>
extends Italic<J>
implements IIcon<IComponentHierarchyBase<?,?>, J>
// Constructor
new WeatherIcons<>(WeatherIcon.day_sunny)
// Methods
icon.getClassName() // Returns the icon CSS class name
icon.getIconComponent() // Returns this component as IComponentHierarchyBaseAll icons render with the wi- CSS class prefix. Underscores become dashes:
WeatherIcon.day_sunny.toString() // → "wi-day-sunny"
WeatherIcon.night_clear.toString() // → "wi-night-clear"
WeatherIcon.wind_beaufort_5.toString() // → "wi-wind-beaufort-5"
WeatherIcon.towards_n.toString() // → "wi-towards-n"| Category | Count | Examples |
|---|---|---|
| Day conditions | 22 | day_sunny, day_rain, day_snow |
| Night conditions | 26 | night_clear, night_cloudy, night_rain |
| General weather | 18 | cloud, rain, snow, lightning |
| Natural disasters | 7 | earthquake, tornado, tsunami |
| Moon phases | 56 | moon_new through moon_alt_waning_crescent_6 |
| Clock faces | 12 | time_1 through time_12 |
| Wind Beaufort | 13 | wind_beaufort_0 through wind_beaufort_12 |
| Wind compass | 32 | towards_n, from_n (16 each) |
| Wind degrees | 32 | towards_0_deg, from_0_deg (16 each) |
| Measurement | 7 | thermometer, barometer, humidity |
| Celestial | 7 | sunrise, sunset, horizon |
| Misc | 4 | alien, train, na, umbrella |
The plugin is automatically configured when present on the classpath. It registers weather-icons.min.css on all pages.
WeatherIconsPageConfigurator.setEnabled(false);com.jwebmp.plugins.weathericons
├── com.jwebmp.core (JWebMP core)
└── com.guicedee.guicedinjection (Guice DI)
com.jwebmp.plugins.weathericons— Icon component, enum, and configurator
public class WeatherCard extends Div<WeatherCard> {
public WeatherCard(WeatherIcon condition, String temperature) {
var icon = new WeatherIcons<>(condition);
add(icon);
add(new Span<>(temperature));
}
}
// Usage
var sunny = new WeatherCard(WeatherIcon.day_sunny, "28°C");
var rainy = new WeatherCard(WeatherIcon.rain, "15°C");var windIcon = new WeatherIcons<>(WeatherIcon.towards_ne);
var beaufort = new WeatherIcons<>(WeatherIcon.wind_beaufort_7);// Show current moon phase (0-27 maps to enum values)
WeatherIcon[] phases = {
WeatherIcon.moon_new, WeatherIcon.moon_waxing_crescent_1,
WeatherIcon.moon_waxing_crescent_2, // ...
WeatherIcon.moon_full
};
var phase = new WeatherIcons<>(phases[currentPhaseIndex]);mvn clean test- Weather Icons — Official icon reference
- JWebMP Home — JWebMP framework documentation
| File | Purpose |
|---|---|
WeatherIcons.java |
CRTP icon component |
WeatherIcon.java |
Enum with 222 weather icons |
WeatherIconsPageConfigurator.java |
Auto-configuration via ServiceLoader |
module-info.java |
JPMS module descriptor |
- No external network calls at runtime
- No secrets or credentials required
- Pure CSS web font icon library
- Fork the repository
- Create a feature branch (
git checkout -b feature/my-feature) - Commit with clear messages (
git commit -m "feat: add weather icon") - Push to your fork (
git push origin feature/my-feature) - Open a Pull Request
| Aspect | Status |
|---|---|
| Version | 2.2 / 2.0.0-SNAPSHOT |
| Icons | 222 complete |
| Java | 25 LTS (required) |
| Build | Passing |
| License | Apache 2.0 |
| Maintenance | Active |
- GitHub Repository: https://github.com/JWebMP/JWebMP
- Weather Icons: http://erikflowers.github.io/weather-icons/
- JWebMP Home: https://jwebmp.com/
Licensed under the Apache License 2.0.
Copyright 2025 JWebMP Contributors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
- Erik Flowers — Original Weather Icons icon font
- JWebMP — Server-driven web framework
- Angular — Modern web framework
- GitHub Issues: https://github.com/JWebMP/JWebMP/issues
- Discussions: https://github.com/JWebMP/JWebMP/discussions
Made with JWebMP