Open In App

Semantic-UI Loader Variations

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 interactive interfaces. It can also be directly used via CDN like bootstrap.

Semantic-UI Loader Variations are used to represent the appearance of the loader element. There are four types of loader variations these are – Inline, Inline Center, Size, and Inverted.



Loader Variations:

Used Classes:



Syntax:

<div class="ui active variation_class loader"></div>

Example 1: In this example, we will describe the loader Inline variation.




<!DOCTYPE html>
<html>
 
<head>
    <title>
        Semantic-UI Loader Inline Variations
    </title>
 
    <link rel="stylesheet" href=
 
    <style>
        .ui.segment {
            padding: 50px 0;
        }
    </style>
</head>
 
<body>
    <div class="ui container center aligned">
        <h2 style="color:green">
            GeeksforGeeks
        </h2>
 
        <h3>Semantic-UI Loader Inline Variations</h3>
    </div>
 
    <div class="ui container">
        <div class="ui segment">
            <div class="ui active inline loader"></div>
        </div>
    </div>
</body>
 
</html>

Output:

Example 2: In this example, we will describe the Inline Center Variation.




<!DOCTYPE html>
<html>
 
<head>
    <title>
        Semantic-UI Loader Inline Center Variations
    </title>
 
    <link rel="stylesheet" href=
 
    <style>
        .ui.segment {
            padding: 50px 0;
        }
    </style>
</head>
 
<body>
    <div class="ui container center aligned">
        <h2 style="color:green">
            GeeksforGeeks
        </h2>
 
        <h3>Semantic-UI Loader Inline Center Variations</h3>
    </div>
 
    <div class="ui container">
        <div class="ui segment">
            <div class="ui active inline centered loader"></div>
        </div>
    </div>
</body>
 
</html>

Output:

Example 3: In this example, we will describe the Loader Size Variation.




<!DOCTYPE html>
<html>
 
<head>
    <title>
        Semantic-UI Loader Size Variations
    </title>
 
    <link rel="stylesheet" href=
 
    <style>
        .ui.segment {
            padding: 60px 0;
        }
        .height {
            height: 250px;
        }
    </style>
</head>
 
<body>
    <div class="ui container center aligned">
        <h2 style="color:green">
            GeeksforGeeks
        </h2>
 
        <h3>Semantic-UI Loader Size Variations</h3>
    </div>
 
    <div class="ui container">
        <div class="ui segment">
            <div class="ui active dimmer">
                <div class="ui mini text loader">
                    GeeksforGeeks Mini Size Loading...
                </div>
            </div>
        </div>
 
        <div class="ui segment">
            <div class="ui active dimmer">
                <div class="ui tiny text loader">
                    GeeksforGeeks Tiny Size Loading...
                </div>
            </div>
        </div>
 
        <div class="ui segment">
            <div class="ui active dimmer">
                <div class="ui small text loader">
                    GeeksforGeeks Small Size Loading...
                </div>
            </div>
        </div>
 
        <div class="ui segment">
            <div class="ui active dimmer">
                <div class="ui medium text loader">
                    GeeksforGeeks Medium Size Loading...
                </div>
            </div>
        </div>
 
        <div class="ui segment">
            <div class="ui active dimmer">
                <div class="ui large text loader">
                    GeeksforGeeks Large Size Loading...
                </div>
            </div>
        </div>
 
        <div class="ui segment">
            <div class="ui active dimmer">
                <div class="ui big text loader">
                    GeeksforGeeks Big Size Loading...
                </div>
            </div>
        </div>
 
        <div class="ui segment">
            <div class="ui active dimmer">
                <div class="ui huge text loader">
                    GeeksforGeeks Huge Size Loading...
                </div>
            </div>
        </div>
 
        <div class="ui segment">
            <div class="ui active dimmer">
                <div class="ui massive text loader">
                    GeeksforGeeks Massive Size Loading...
                </div>
            </div>
        </div>
 
        <div class="height"></div>
    </div>
</body>
 
</html>

Output:

Example 4: In this example, we will describe the Loader Inverted Variation.




<!DOCTYPE html>
<html>
 
<head>
    <title>
        Semantic-UI Loader Inverted Variations
    </title>
 
    <link rel="stylesheet" href=
 
    <style>
        .ui.segment {
            padding: 60px 0;
        }
    </style>
</head>
 
<body>
    <div class="ui container center aligned">
        <h2 style="color:green">
            GeeksforGeeks
        </h2>
 
        <h3>Semantic-UI Loader Inverted Variations</h3>
    </div>
 
    <div class="ui container">
        <div class="ui segment">
            <div class="ui active inverted dimmer">
                <div class="ui text loader">
                    GeeksforGeeks Loading...
                </div>
            </div>
        </div>
    </div>
</body>
 
</html>

Output:

Reference: https://semantic-ui.com/elements/loader.html


Article Tags :