Open In App

Primer CSS Timeline TimelineItem-Break

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

Primer CSS is open-source on Github that is created with GitHub’s design system. We can use Primer CSS by installing it via npm or include the CDN link in our HTML file. It has different types of styles like spacing, color, and typography.  

Primer CSS Timeline is used to display the items in the vertical direction. Primer CSS TimelineItem-Break is used to create the horizontal break line in the timeline.

In this article, we will discuss Primer CSS TimelineItem-Break.

Primer CSS TimelineItem-Break Class:

  • TimelineItem-break: This class is used to create the horizontal break line in the timeline.

Syntax:

<div class="TimelineItem">
  <div class="TimelineItem-badge">
     ...
  </div>
  <div class="TimelineItem-break"></div>
  <div class="TimelineItem-body">
     ...
  </div>
</div>

Example 1: The following example demonstrates the Primer CSS TimelineItem-Break.

HTML




<!DOCTYPE html>
<html>
  
<head>
  <link rel="stylesheet" href=
"https://unpkg.com/@primer/css@^18.0.0/dist/primer.css" />
</head>
  
<body>    
    <div class="text-center">
        <h1 class="color-fg-success"> GeeksforGeeks </h1>
        <h3> Primer CSS TimelineItem-Break </h3>
    </div> <br>
  
    <div class="d-flex flex-justify-center">
        <div class="d-flex flex-column">
          <div class="TimelineItem">
            <div class="TimelineItem-badge">
              <svg class="octicon"
                   width="18" height="18" 
                   viewBox="0 0 16 16" >
                <path fill-rule="evenodd" clip-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 class="TimelineItem-body">
              GeeksforGeeks TimelineItem-Break
            </div>
          </div>
          <div class="TimelineItem-break ml-0"></div>
  
          <div class="TimelineItem">
            <div class="TimelineItem-badge">
              <svg class="octicon"
                   width="18" height="18" 
                   viewBox="0 0 16 16" >
                <path fill-rule="evenodd" clip-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 class="TimelineItem-body">
              GeeksforGeeks TimelineItem-Break
            </div>
          </div>
        </div>
    </div>
</body>
</html>


Output:

Primer CSS TimelineItem-Break

Example 2: The following example demonstrates the Primer CSS TimelineItem-Break.

HTML




<!DOCTYPE html>
<html>
  
<head>
  <link rel="stylesheet" href=
"https://unpkg.com/@primer/css@^18.0.0/dist/primer.css" />
</head>
  
<body>    
    <div class="text-center">
        <h1 class="color-fg-success"> GeeksforGeeks </h1>
        <h3> Primer CSS TimelineItem-Break </h3>
    </div> <br>
  
    <div class="d-flex flex-justify-center">
        <div class="d-flex flex-column">
          <div class="TimelineItem">
            <div class="TimelineItem-badge color-bg-success-emphasis 
                        color-fg-on-emphasis" >
              <svg class="octicon"
                   width="18" height="18" 
                   viewBox="0 0 16 16" >
                <path fill-rule="evenodd" clip-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 class="TimelineItem-body">
              GFG TimelineItem-Break
            </div>
          </div>
          <div class="TimelineItem-break ml-0"></div>
  
          <div class="TimelineItem">
            <div class="TimelineItem-badge color-bg-done-emphasis 
                        color-fg-on-emphasis" >
              <svg class="octicon"
                   width="18" height="18" 
                   viewBox="0 0 16 16" >
                <path fill-rule="evenodd" clip-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 class="TimelineItem-body">
              GFG TimelineItem-Break
            </div>
          </div>
          <div class="TimelineItem-break ml-0"></div>
  
          <div class="TimelineItem">
            <div class="TimelineItem-badge color-bg-danger-emphasis 
                        color-fg-on-emphasis">
              <svg class="octicon"
                   width="18" height="18" 
                   viewBox="0 0 16 16" >
                <path fill-rule="evenodd" clip-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 class="TimelineItem-body">
              GFG TimelineItem-Break
            </div>
          </div>
        </div>
    </div>
</body>
  
</html>


Output:

Primer CSS TimelineItem-Break

Reference: https://primer.style/css/components/timeline#timelineitem-break



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

Similar Reads