Open In App

Primer CSS Alerts Full Width Flash

Last Updated : 12 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 Alerts are alerts or flash messages to inform us about the status of the actions. The Full Width Flash is used to create the full-width alert message without the border and border-radius.

Primer CSS Alerts Full Width Flash Class:

  • flash-full: This class is used to create a full-width alert message.

Syntax:

<div class="flash flash-full">
  Content
</div>

Example 1: This example demonstrates the use of the Primer CSS Alerts Full Width Flash.

HTML




<!DOCTYPE html>
<html>
  
<head>
    <title> Primer CSS Alerts Full Width Flash </title>
    <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 Alerts Full Width Flash </h3>
    </div>
    <br>
    <div class="flash flash-full"
        GeeksforGeeks full-width alert 
    </div>
</body>
</html>


Output:

Primer CSS Alerts Full Width Flash

Example 2: This example demonstrates the use of the Primer CSS Alerts Full Width Flash with SVG icon.

HTML




<!DOCTYPE html>
<html>
  
<head>
    <title> Primer CSS Alerts Full Width Flash </title>
    <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 Alerts Full Width Flash </h3>
    </div>
    <br>
    <div class="flash flash-full flash-success">
        <svg class="octicon"
             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
        GeeksforGeeks full-width alert 1
    </div>
    <div class="flash mt-2 flash-full flash-warn">
        <svg class="octicon" 
             viewBox="0 0 16 16" 
             width="18" 
             height="18">
            <path fill-rule="evenodd"
                  d="M13.78 4.22a.75.75 0 010 1.06l-7.25 
            7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 
            011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"> 
            </path>
        </svg> GeeksforGeeks full-width alert 2 
    </div>
</body>
</html>


Output:

Primer CSS Alerts Full Width Flash

Reference: https://primer.style/css/components/alerts#full-width-flash



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

Similar Reads