Open In App

Primer CSS Select menu Loading

Last Updated : 19 Apr, 2022
Improve
Improve
Like Article
Like
Save
Share
Report

Primer CSS is a free open-source CSS framework that is built upon systems that create the foundation of the basic style elements such as spacing, typography, and color. This systematic method makes sure our patterns are steady and interoperable with every other. Its approach to CSS is influenced by Object-Oriented CSS principles, functional CSS, and BEM architecture. It is highly reusable and flexible. It is created with GitHub’s design system.

Primer CSS Select menu Loading is used to load the list of items by showing the loading animation using the SelectMenu-loading class. In this article, we will discuss Primer CSS Select menu Loading.

Primer CSS Select menu Loading Class:

  • SelectMenu-loading: This class is used to show the loading state using the animation.

Syntax:

<details class="details-reset 
  details-overlay" open>
  ...
  <div class="SelectMenu">
    <div class="SelectMenu-modal">
      <div class="SelectMenu-list">
        <div class="SelectMenu-loading">
          ...
        </div>
      </div>
    </div>
  </div>
</details>

Example 1: This example demonstrates the implementation of Primer CSS Select menu Loading.

HTML




<!DOCTYPE html>
<html>
  
<head>
    <title> Primer CSS Select menu Loading </title>
    <link rel="stylesheet" href=
"https://unpkg.com/@primer/css@^18.0.0/dist/primer.css" /> 
</head>
  
<body class="m-2">
    <h1 class="color-fg-success"> GeeksforGeeks</h1>
    <h3> Primer CSS Select menu Loading </h3> <br>
  
    <details class="details-reset details-overlay" open>
        <summary class="btn" aria-haspopup="true">
          Select menu Loading
        </summary>
        <div class="SelectMenu">
            <div class="SelectMenu-modal">
                <div class="SelectMenu-list">
                    <div class="SelectMenu-loading">
                        <svg class="octicon octicon-octoface anim-rotate" 
                             viewBox="0 0 16 16" width="18" height="18" >
                            <path fill-rule="evenodd" 
                                d="M11.5 7a4.499 4.499 0 11-8.998 
                                    0A4.499 4.499 0 0111.5 7zm-.82 4.74a6 
                                    6 0 111.06-1.06l3.04 3.04a.75.75 0 
                                    11-1.06 1.06l-3.04-3.04z">
                            </path>
                        </svg>
                    </div>
                </div>
            </div>
        </div>
    </details>
</body>
  
</html>


Output:

Primer CSS Select menu Loading

Example 2: This example demonstrates the implementation of the Primer CSS Select menu Loading with header and footer.

HTML




<!DOCTYPE html>
<html>
  
<head>
    <title> Primer CSS Select menu Loading </title>
    <link rel="stylesheet" href=
"https://unpkg.com/@primer/css@^18.0.0/dist/primer.css" /> 
</head>
  
<body class="m-2">
    <h1 class="color-fg-success"> GeeksforGeeks</h1>
    <h3> Primer CSS Select menu Loading </h3> <br>
  
    <details class="details-reset details-overlay" open>
        <summary class="btn" aria-haspopup="true">
          Select menu Loading
        </summary>
        <div class="SelectMenu">
            <div class="SelectMenu-modal">
                <header class="SelectMenu-header">
                    <h3 class="SelectMenu-title"> GeeksforGeeks </h3>
                </header>
  
                <div class="SelectMenu-list">
                    <div class="SelectMenu-loading">
                        <svg class="octicon octicon-octoface anim-pulse" 
                            viewBox="0 0 16 16" width="18" height="18" >
                            <path fill-rule="evenodd" 
                                d="M11.5 7a4.499 4.499 0 11-8.998 
                                    0A4.499 4.499 0 0111.5 7zm-.82 4.74a6 
                                    6 0 111.06-1.06l3.04 3.04a.75.75 0 
                                    11-1.06 1.06l-3.04-3.04z">
                            </path>
                        </svg>
                    </div>
                </div>
                <footer class="SelectMenu-footer">Loading items...</footer>
            </div>
        </div>
    </details>
</body>
  
</html>


Output:

Primer CSS Select menu Loading

Reference: https://primer.style/css/components/select-menu#loading



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

Similar Reads