You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Flash messages, or alerts, inform users of successful or pending actions. Use them sparingly. Don't show more than one at a time.
11
10
12
11
## Default
13
12
14
13
Flash messages start off looking decently neutral—they're just light blue rounded rectangles.
15
14
16
-
```html
15
+
```html live
17
16
<divclass="flash">
18
17
Flash message goes here.
19
18
</div>
20
19
```
21
20
22
21
You can put multiple paragraphs of text in a flash message—the last paragraph's bottom `margin` will be automatically override.
23
22
24
-
```html
23
+
```html live
25
24
<divclass="flash">
26
-
<p>This is a longer flash message in it's own paragraph. It ends up looking something like this. If we keep adding more text, it'll eventually wrap to a new line.</p>
25
+
<p>
26
+
This is a longer flash message in it's own paragraph. It ends up looking something like this. If we keep adding more
27
+
text, it'll eventually wrap to a new line.
28
+
</p>
27
29
<p>And this is another paragraph.</p>
28
30
</div>
29
31
```
30
32
31
-
Should the need arise, you can quickly space out your flash message from surrounding content with a `.flash-messages` wrapper. *Note the extra top and bottom margin in the example below.*
33
+
Should the need arise, you can quickly space out your flash message from surrounding content with a `.flash-messages` wrapper. _Note the extra top and bottom margin in the example below._
32
34
33
-
```html
35
+
```html live
34
36
<divclass="flash-messages">
35
37
<divclass="flash">
36
38
Flash message goes here.
@@ -42,19 +44,19 @@ Should the need arise, you can quickly space out your flash message from surroun
42
44
43
45
Add `.flash-warn`, `.flash-error`, or `.flash-success` to the flash message to make it yellow, red, or green, respectively.
44
46
45
-
```html
47
+
```html live
46
48
<divclass="flash flash-warn">
47
49
Flash message goes here.
48
50
</div>
49
51
```
50
52
51
-
```html
53
+
```html live
52
54
<divclass="flash flash-error">
53
55
Flash message goes here.
54
56
</div>
55
57
```
56
58
57
-
```html
59
+
```html live
58
60
<divclass="flash flash-success">
59
61
Flash message goes here.
60
62
</div>
@@ -64,9 +66,15 @@ Add `.flash-warn`, `.flash-error`, or `.flash-success` to the flash message to m
64
66
65
67
Add an icon to the left of the flash message to give it some funky fresh attention.
0 commit comments