Horje
Semantic-UI Progress Active State

Semantic UI is an open-source development framework that provides pre-defined classes to make our website look beautiful, amazing, and responsive. It is similar to Bootstrap which has predefined classes. It uses jQuery and CSS to create the interfaces. It can also be directly used via CDN like bootstrap.

The progress bars indicate the progress of the work done out of the total work. It visually indicates the amount of work done using the bars. In semantic-UI, the progress bars come with a good interface and with different amazing classes. In this article, let us see about the progress active state.

Semantic UI Progress active state used class:

  • active: It indicates that the current work progress is active through animation.

Syntax:

<div class="ui active progress" data-percent="..">
  <div class="bar">
     <div class="progress"></div>
  </div>
</div>

Example 1: The following code demonstrates the progress bar of the active state.

HTML

<!DOCTYPE html>
<html>
  
<head>
  <link href=
  rel="stylesheet"/>
  
  <script src=
"sha256-hVVnYaiADRTO2PzUGmuLJr8BLUSjGIZsDYGmIJLv2b8=" 
 crossorigin="anonymous">
  </script>
  
  <script src=
  </script>
</head>
  
<body>
  <center>
    <h1 class="ui green header">Geeksforgeeks</h1>
    <strong>
      Semantic-UI Progress Active State
    </strong><br/><br/>
  </center>
  
  <div class="ui container">
    <div class="ui active progress" data-percent="58" id="eg">
      <div class="bar">
        <div class="progress"></div>
      </div>
      <div class="label">Transferring files</div>
    </div>
  </div>
  
  <script>
      $('#eg').progress();
  </script>
</body>
  
</html>

Output:

Example 2:  The following code demonstrates the progress bar of the active state with jQuery.

HTML

<!DOCTYPE html>
<html>
  
<head>
  <link href=
    rel="stylesheet"/>
  
  <script src=
    "sha256-hVVnYaiADRTO2PzUGmuLJr8BLUSjGIZsDYGmIJLv2b8=" 
    crossorigin="anonymous">
  </script>
  
  <script src=
  </script>
</head>
  
<body>
  <center>
    <h1 class="ui green header">Geeksforgeeks</h1>
    <strong>
      Semantic-UI Progress Active State
    </strong>
    <br />
    <br />
  </center>
  
  <div class="ui container">
    <div class="ui active progress" data-value="0" 
         data-total="10" id="eg">
      <div class="bar">
        <div class="progress"></div>
      </div>
  
      <div class="label">
        Transferring files
      </div>
    </div>
  
    <div class="ui button">
      Transfer
    </div>
  </div>
  
  <script>
    $('.ui.button').on('click', function () {
      $('.progress').progress('increment');
    });
  </script>
  
</body>
  
</html>

Output:

Reference: https://semantic-ui.com/modules/progress.html#active




Reffered: https://www.geeksforgeeks.org


CSS

Related
Semantic-UI Dropdown Header Content Semantic-UI Dropdown Header Content
Semantic-UI Icon Set Medical Semantic-UI Icon Set Medical
Semantic-UI Header Attached Variations Semantic-UI Header Attached Variations
Foundation CSS Kitchen Sink Title Bar Foundation CSS Kitchen Sink Title Bar
Semantic-UI Header Block Variations Semantic-UI Header Block Variations

Type:
Geek
Category:
Coding
Sub Category:
Tutorial
Uploaded by:
Admin
Views:
8