VOOZH about

URL: https://www.geeksforgeeks.org/css/primer-css-layout-sidebar-positioning-as-rows/

⇱ Primer CSS Layout Sidebar positioning as rows - GeeksforGeeks


  • Courses
  • Tutorials
  • Interview Prep

Primer CSS Layout Sidebar positioning as rows

Last Updated : 23 Jul, 2025

Primer CSS is a free and open-source CSS framework that is built using the GitHub design system for providing support to the broad spectrum of GitHub websites. It helps in creating the foundation of the basic style elements such as spacing, components, typography, color, etc.

In this article, we'll see about the Layout of Sidebar positioning as rows. We can position the sidebar as rows, i.e, either render it first, or last, or can hide it also.

Primer CSS Layout Sidebar positioning as rows Classes:

  • Layout--sidebarPosition-flowRow-start: This class renders the sidebar to the top of the main container when stacked. This is the default positioning of the sidebar as rows.
  • Layout--sidebarPosition-flowRow-end: This class renders the sidebar after the main container when stacked.
  • Layout--sidebarPosition-flowRow-none: This class hides the sidebar when stacked.

Syntax:

<div class="Layout Layout--sidebarPosition-flowRow-start |
 Layout--sidebarPosition-flowRow-end | 
 Layout--sidebarPosition-flowRow-none">
 <div class="Layout-main border">...</div>
 <div class="Layout-sidebar border">...</div>
</div>

Example 1: Below example demonstrates the layout sidebar with a row having a start position.

Output:

👁 Image
 

Example 2: Below example demonstrates the layout sidebar with a row having an end position.

Output:

👁 Image
 

Example 3: Below example demonstrates the layout sidebar with a row having a none position. The sidebar will be hidden for the medium or small screen-side devices.

Output:

👁 Image
 

Reference: https://primer.style/#sidebar-positioning-as-rows

Comment