Open In App

Foundation CSS Progress Bar Native Meter

Last Updated : 22 Mar, 2022
Improve
Improve
Like Article
Like
Save
Share
Report

Foundation CSS is an open-source & responsive front-end framework built by ZURB foundation in September 2011, that makes it easy to design beautiful responsive websites, apps, and emails that look amazing & can be accessible to any device. It is used by many companies such as Facebook, eBay, Mozilla, Adobe, and even Disney. The framework is built on Saas-like bootstrap. It is more sophisticated, flexible, and easily customizable. It also comes with CLI, so it’s easy to use it with module bundlers. It offers the Fastclick.js tool for faster rendering on mobile devices.

A Progress bar is used to show how far a task has progressed, ie., it shows how much of the task has been completed and how much remains. It is mainly used to represent a value that changes over time. The Native Meter can be used to display the fluctuating value between the lower & optimum points, ie., it represents a value that fluctuates around near to an optimum value.

The difference between <meter> and <progress> is that the <progress> denotes the overall completion of the task over the change in the time period, whereas the <meter> denotes the fluctuating value near the optimum value.

Syntax:

<meter value="" min="" low="" high="" optimum="" max=""></meter>

Foundation CSS Progress Bar Native Meter Attributes:

  • max: The measured range’s top numeric bound. If a minimum value (min attribute) is provided, this must be larger. The maximum value is 1 if no value is supplied.
  • min: The measured range’s bottom numeric bound. If the maximum value (max attribute) is supplied, this must be smaller. The minimum value is 0 if none is given.
  • optimum: The ideal numeric value is indicated by this characteristic. It has to be in the acceptable range (as defined by the min attribute and max attribute). It indicates where along the range is regarded ideal when combined with the low and high attributes. For example, if the min attribute and the low attribute are both available, the lower range is selected.
  • low: The lower numeric bound of the measured range’s bottom end. If any are supplied, this must be larger than the lowest value (min attribute) and less than the high and maximum values (high attribute and max attribute, respectively). The low value is equal to the minimum value if it is undefined or less than the minimum value.
  • high: The lower numeric bound of the measured range’s high end. If any are supplied, this must be less than the maximum value (max attribute) and larger than the low value and lowest value (low attribute and min attribute, respectively). If the high value is undefined or more than the maximum value, the high value equals the maximum value.
  • value: The numeric value that is currently in use. If the lowest and maximum values (min and max attributes) are defined, this must be between them. The value is 0 if the value is undefined or faulty. The value is equal to the nearest end of the range if supplied but not within the range defined by the min and max attributes.

Note: Unless the value attribute’s value is between 0 and 1 (inclusive), the min and max attributes should be used to specify the range such that the value attribute’s value is contained within it.

Example: This example illustrates the basic implementation of the Progress Bar Native Meter in Foundation CSS.

HTML




<!DOCTYPE html>
<html lang="en">
  
<head>
      
    <!-- Compressed CSS -->
    <link rel="stylesheet" href=
          crossorigin="anonymous" />
    <style>
    meter {
        width: 100%;
        height: 50px;
    }
    </style>
    <title>Foundation CSS Progress Bar Native Meter</title>
</head>
  
<body style="padding: 30px;">
    <center>
        <h2 style="color: green">GeeksforGeeks</h2>
        <h4>Foundation CSS Progress Bar Native Meter</h4>
        <br /> 
    </center>
    <meter value="19" 
           min="0" 
           low="20" 
           high="70" 
           optimum="100" 
           max="100">
    </meter>
    <br>
    <meter value="60" 
           min="0" 
           low="25" 
           high="80" 
           optimum="100" 
           max="100">
    </meter>
    <br>
    <meter value="100" 
           min="0" 
           low="10" 
           high="90" 
           optimum="100" 
           max="100">
    </meter>
</body>
</html>


Output:

Progress Bar Native Meter

Reference: https://get.foundation/sites/docs/progress-bar.html#native-meter



Like Article
Suggest improvement
Previous
Next
Share your thoughts in the comments

Similar Reads