Class Meter


@Bean(typeName="meter") public class Meter extends HtmlElementMixed
DTO for an HTML <meter> element.

The meter element represents a scalar measurement within a known range, or a fractional value. It is used to display a gauge or meter showing a value within a defined range, such as disk usage, memory usage, or progress. The meter element is not suitable for representing a range of values (use the input element with type="range" for that). It is typically rendered as a visual gauge or bar that shows the current value relative to the minimum and maximum values.

Examples:

import static org.apache.juneau.bean.html5.HtmlBuilder.*; // Simple meter Meter simple = meter() .value(50) .min(0) .max(100); // Meter with styling Meter styled = meter() ._class("progress-meter") .value(75) .min(0) .max(100); // Meter with complex content Meter complex = meter() .value(60) .min(0) .max(100) .low(25) .high(75) .optimum(50); // Meter with ID Meter withId = meter() .id("disk-usage") .value(80) .min(0) .max(100); // Meter with styling Meter styled2 = meter() .style("width: 200px; height: 20px;") .value(40) .min(0) .max(100); // Meter with multiple attributes Meter multiple = meter() .value(85) .min(0) .max(100) .low(20) .high(80) .optimum(50) .title("Disk Usage: 85%"); // Meter with form Meter withForm = new Meter() .form("usage-form") .value(30) .min(0) .max(100);

See Also: