Skip to content
Related Articles

Related Articles

Semantic-UI Message Warning Variation

Improve Article
Save Article
  • Last Updated : 14 Mar, 2022
Improve Article
Save Article

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.
Semantic UI  provides the users with various different message type classes that can be used for different purposes to display a message with a good interface. In this article let us see about the messages of warning variation in Semantic UI.

Semantic-UI floating variation type message classes:

  • warning: This indicates that the message is of warning type by a color.

Syntax:

 <div class="ui warning message">
    .....
 </div>

Example-1: This example demonstrates the basic message warning variation.

HTML




<!DOCTYPE html>
<html>
   <head>
      <link href=
            rel="stylesheet" />
      <script src=
         integrity=
"sha256-hVVnYaiADRTO2PzUGmuLJr8BLUSjGIZsDYGmIJLv2b8="
              crossorigin="anonymous">
      </script>
      <script src=
      </script>
   </head>
   <body>
      <center>
         <h1 class="ui green header">GeeksforGeeks</h1>
         <strong>
         Semantic-UI Message Warning variation
         </strong>
      </center>
      <br />
      <br />
      <div class="ui container">
         <div class="ui warning message">
            <div class="header">
               Some files not loaded enable JavaScript to load them
            </div>
         </div>
      </div>
   </body>
</html>


Output :

Semantic-UI Message Warning Variation

Semantic-UI Message Warning Variation

Example-2: This example demonstrates the message warning variation.
 

HTML




<!DOCTYPE html>
<html>
   <head>
      <link href=
            rel="stylesheet" />
      <script src=
              integrity=
"sha256-hVVnYaiADRTO2PzUGmuLJr8BLUSjGIZsDYGmIJLv2b8="
              crossorigin="anonymous">
      </script>
      <script src=
      </script>
   </head>
   <body>
      <center>
         <h1 class="ui green header">GeeksforGeeks</h1>
         <strong>
         Semantic-UI Message Warning variation
         </strong>
      </center>
      <br />
      <br />
      <div class="ui container">
         <div class="ui warning message transition">
            <i class="close icon"></i>
            <div class="header">
               A newer version available download
              to have the better experience
            </div>
            Visit <a href="#"> this </a> page to know more about the update
         </div>
      </div>
   </body>
   <script>
      $('.message .close').on('click', function () {
        $(this).closest('.message').transition('fade up');
      });     
   </script>
</html>


Output :
 

Semantic-UI Message Warning Variation

Semantic-UI Message Warning Variation

Reference: https://semantic-ui.com/collections/message.html#warning


My Personal Notes arrow_drop_up
Related Articles

Start Your Coding Journey Now!