VOOZH about

URL: https://www.geeksforgeeks.org/css/primer-css-toasts-toast-position/

โ‡ฑ Primer CSS Toasts Toast Position - GeeksforGeeks


  • Courses
  • Tutorials
  • Interview Prep

Primer CSS Toasts Toast Position

Last Updated : 23 Jul, 2025

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.

The Toast is used to display live feedback to the user. The Position is used to specify the toast position by adding the utility classes on a wrapper element of the viewport.

Primer CSS Toast Position Class:

  • *position: It is used to specify the toast position. For eg., position-fixed bottom-0 right-0.

Syntax:

<div class="*position">
 <div class="Toast">
 <span class="Toast-icon">
 Content
 </span>
 <span class="Toast-content">
 Content
 </span>
 </div>
</div>

Example 1: The following code demonstrates the Primer CSS Toast Position at the bottom right position.

Output:

๐Ÿ‘ Image
Primer CSS Toast Position at the bottom right position

Example 2: This example demonstrates the Primer CSS Toast Position at the top-left position.

Output:

๐Ÿ‘ Image
Primer CSS Toast Position at the top left position

Reference: https://primer.style/#toast-position

Comment