Open In App

Primer CSS Select menu Divider

Last Updated : 24 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. In this article, we will discuss Primer CSS Divider.

The Select menu Divider is used to separate multiple parts of select menu list items by adding a SelectMenu-divider class.

Primer CSS Divider class:

  • SelectMenu-divider: This class is used to add a divider element between various parts of menu list items.

Syntax:

<header class="SelectMenu-header">
       <h3 class="SelectMenu-title">.......</h3>
</header>

Example 1: This example demonstrates the use of Primer CSS Divider.

HTML




<!DOCTYPE html>
<html>
  
<head>
    <title>Primer CSS Divider</title>
    <link rel="stylesheet" href=
"https://unpkg.com/@primer/css@^19.0.0/dist/primer.css" />
</head>
  
<body>
    <div class="pl-12">
        <h1 style="color:green">GeeksforGeeks</h1>
        <h3>Primer CSS Divider</h3>
  
        <details class="details-reset details-overlay" open>
            <summary class="btn" aria-haspopup="true">
                Choose any course
            </summary>
            <div class="SelectMenu">
                <div class="SelectMenu-modal">
                    <header class="SelectMenu-header">
                        <h3 class="SelectMenu-title">
                            GeeksforGeeks Courses
                        </h3>
                    </header>
                    <div class="SelectMenu-list">
                        <div class="SelectMenu-divider">Live Courses</div>
                        <button class="SelectMenu-item" role="menuitem">
                            System Design
                        </button>
                        <button class="SelectMenu-item" role="menuitem">
                            Full Stack Live
                        </button>
                        <div class="SelectMenu-divider">Online Course</div>
                        <button class="SelectMenu-item" role="menuitem">
                            DSA-Self Paced
                        </button>
                        <button class="SelectMenu-item" role="menuitem">
                            C++ STL
                        </button>
                    </div>
                </div>
            </div>
        </details>
    </div>
</body>
  
</html>


Output:

Primer CSS Divider 

Example 2: This is another example that demonstrates the use of Primer CSS Divider.

HTML




<!DOCTYPE html>
<html>
  
<head>
    <title>Primer CSS Divider</title>
    <link rel="stylesheet" href=
"https://unpkg.com/@primer/css@^19.0.0/dist/primer.css" />
</head>
  
<body>
    <div class="pl-12">
        <h1 style="color:green">GeeksforGeeks</h1>
        <h3>Primer CSS Divider</h3>
  
        <details class="details-reset details-overlay" open>
            <summary class="btn" aria-haspopup="true">
                Choose any event
            </summary>
            <div class="SelectMenu">
                <div class="SelectMenu-modal">
                    <header class="SelectMenu-header">
                        <h3 class="SelectMenu-title">
                            GeeksforGeeks Events
                        </h3>
                    </header>
                    <div class="SelectMenu-list">
                        <div class="SelectMenu-divider">Live events</div>
                        <button class="SelectMenu-item" role="menuitem">
                            Problem of The Day
                        </button>
                        <button class="SelectMenu-item" role="menuitem">
                            Interview Series
                        </button>
                        <div class="SelectMenu-divider">Upcoming events</div>
                        <button class="SelectMenu-item" role="menuitem">
                            Get Hired with GeeksforGeeks at SuperK
                        </button>
                        <button class="SelectMenu-item" role="menuitem">
                            Job-A-Thon 8: Hiring Challenge
                        </button>
                    </div>
                </div>
            </div>
        </details>
    </div>
</body>
  
</html>


Output:

Primer CSS Divider 

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



Like Article
Suggest improvement
Share your thoughts in the comments

Similar Reads