Primer CSS Alerts Default
Last Updated :
19 Apr, 2022
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. Primer CSS Alerts Default is used to create the rounded rectangular alert in light blue color. In this article, we will discuss Primer CSS Alerts Default.
Primer CSS Alerts Default Classes:
- flash: This class is used to create the flash message.
- flash-messages: This class is used to add the space on the top and bottom to the flash message.
Syntax:
<div class="flash">
....
</div>
Example 1: This example demonstrates the use of the Primer CSS Alerts Default.
HTML
<!DOCTYPE html>
<html>
<head>
<title> Primer CSS Alerts Default </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 Default </h3>
</div> <br> <br>
<div class="flash">
A Computer Science portal for geeks.
</div>
</body>
</html>
Output:
Primer CSS Alerts Default
Example 2: This example demonstrates the use of the Primer CSS Alerts Default.
HTML
<!DOCTYPE html>
<html>
<head>
<title> Primer CSS Alerts Default </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 Default </h3>
</div> <br> <br>
<div class="flash-messages">
<div class="flash">
<svg class="octicon" viewBox="0 0 16 16"
width="20" height="20" >
<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>
A Computer Science portal for geeks.
</div>
</div>
<div class="flash-messages">
<div class="flash">
<svg class="octicon" viewBox="0 0 16 16"
width="20" height="20" >
<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
</div>
</div>
</body>
</html>
Output:
Primer CSS Alerts Default
Reference: https://primer.style/css/components/alerts#default
Similar Reads
Primer CSS Default Border 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. It is a system that assists us to build consistent user experiences efficiently with enough flexibility. This systematic approach e
2 min read
Primer CSS Alerts 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. It is highly reusable and flexible. It is created with GitHubâs design system.Alerts are used to signify an important message to th
3 min read
Primer CSS Alerts Full Width Flash 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
2 min read
Primer CSS Alerts Flash Banner 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
2 min read
Primer CSS Toasts Default Primer CSS is a CSS framework that is built to bootstrap your web project with premade design system which includes spacing, typography, color, and many components and utilities. It follows the BEM (Block, Element, and Modifier) approach to name the CSS classes. Primer CSS Toasts are used to show li
2 min read