x
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
<div class="midwest-notifications-container placement-top-right" popover="manual" aria-live="polite" aria-atomic="false"><turbo-frame id="midwest-notifications"> <div role="status" aria-live="polite" aria-atomic="true" data-controller="midwest-notification" data-action="midwest-countdown-timer:complete->midwest-notification#close" class="midwest-notification animated theme-cyan"> <div class="midwest-notification__body"> <div class="midwest-icon midwest-notification__icon"> <div class="midwest-icon-inner"> <svg xmlns="http://www.w3.org/2000/svg" class="Midwest-Icon__Svg" viewbox="0 0 512 512" focusable="false" role="img" aria-label="Information circle"><title>Information circle</title><path d="M256 56C145.72 56 56 145.72 56 256s89.72 200 200 200 200-89.72 200-200S366.28 56 256 56zm0 82a26 26 0 11-26 26 26 26 0 0126-26zm48 226h-88a16 16 0 010-32h28v-88h-16a16 16 0 010-32h32a16 16 0 0116 16v104h28a16 16 0 010 32z"></path></svg> </div></div> <div class="midwest-notification__content"> <p class="midwest-notification__title">Tip</p> <div class="midwest-notification__message">Dismiss me, then wait for another to arrive.</div> </div> </div> <button data-action="midwest-notification#close" class="midwest-button variant-default size-small pill contrast theme-primary" name="button"> <span class="midwest-button-content"> <span class="sr-only">Dismisses in 8 seconds</span> <div data-controller="midwest-countdown-timer" data-midwest-countdown-timer-seconds-value="8" style="--duration: 8s; --circumference: 69.115;" aria-hidden="true" class="midwest-countdown-timer"> <svg viewBox="0 0 28 28" width="1em" height="1em"> <circle class="midwest-countdown-timer__track" cx="14" cy="14" r="11" /> <circle class="midwest-countdown-timer__progress" cx="14" cy="14" r="11" stroke-dasharray="69.115" /> </svg></div></span><div class="midwest-loading-icon" role="img" aria-label="Loading" aria-hidden="true" style="display: none"> <div class="midwest-loading-icon-inner"> <!-- By Sam Herbert (@sherb), for everyone. More @ http://goo.gl/7AJzbL --><svg viewbox="0 0 120 30" xmlns="http://www.w3.org/2000/svg" fill="currentColor" class="Midwest-LoadingIcon__Svg" focusable="false" aria-hidden="true"> <circle cx="15" cy="15" r="15"> <animate attributename="r" from="15" to="15" begin="0s" dur="0.8s" values="15;9;15" calcmode="linear" repeatcount="indefinite"></animate> <animate attributename="fill-opacity" from="1" to="1" begin="0s" dur="0.8s" values="1;.5;1" calcmode="linear" repeatcount="indefinite"></animate> </circle> <circle cx="60" cy="15" r="9" fill-opacity="0.3"> <animate attributename="r" from="9" to="9" begin="0s" dur="0.8s" values="9;15;9" calcmode="linear" repeatcount="indefinite"></animate> <animate attributename="fill-opacity" from="0.5" to="0.5" begin="0s" dur="0.8s" values=".5;1;.5" calcmode="linear" repeatcount="indefinite"></animate> </circle> <circle cx="105" cy="15" r="15"> <animate attributename="r" from="15" to="15" begin="0s" dur="0.8s" values="15;9;15" calcmode="linear" repeatcount="indefinite"></animate> <animate attributename="fill-opacity" from="1" to="1" begin="0s" dur="0.8s" values="1;.5;1" calcmode="linear" repeatcount="indefinite"></animate> </circle></svg> </div></div></button></div> <div role="status" aria-live="polite" aria-atomic="true" data-controller="midwest-notification" data-action="midwest-countdown-timer:complete->midwest-notification#close" class="midwest-notification animated theme-green"> <div class="midwest-notification__body"> <div class="midwest-icon midwest-notification__icon"> <div class="midwest-icon-inner"> <svg xmlns="http://www.w3.org/2000/svg" class="Midwest-Icon__Svg" viewbox="0 0 512 512" focusable="false" role="img" aria-label="Checkmark circle"><title>Checkmark circle</title><path d="M256 48C141.31 48 48 141.31 48 256s93.31 208 208 208 208-93.31 208-208S370.69 48 256 48zm108.25 138.29l-134.4 160a16 16 0 01-12 5.71h-.27a16 16 0 01-11.89-5.3l-57.6-64a16 16 0 1123.78-21.4l45.29 50.32 122.59-145.91a16 16 0 0124.5 20.58z"></path></svg> </div></div> <div class="midwest-notification__content"> <p class="midwest-notification__title">Success</p> <div class="midwest-notification__message">Your changes were saved.</div> </div> </div> <button data-action="midwest-notification#close" class="midwest-button variant-default size-small pill contrast theme-primary" name="button"> <span class="midwest-button-content"> <span class="sr-only">Dismisses in 8 seconds</span> <div data-controller="midwest-countdown-timer" data-midwest-countdown-timer-seconds-value="8" style="--duration: 8s; --circumference: 69.115;" aria-hidden="true" class="midwest-countdown-timer"> <svg viewBox="0 0 28 28" width="1em" height="1em"> <circle class="midwest-countdown-timer__track" cx="14" cy="14" r="11" /> <circle class="midwest-countdown-timer__progress" cx="14" cy="14" r="11" stroke-dasharray="69.115" /> </svg></div></span><div class="midwest-loading-icon" role="img" aria-label="Loading" aria-hidden="true" style="display: none"> <div class="midwest-loading-icon-inner"> <!-- By Sam Herbert (@sherb), for everyone. More @ http://goo.gl/7AJzbL --><svg viewbox="0 0 120 30" xmlns="http://www.w3.org/2000/svg" fill="currentColor" class="Midwest-LoadingIcon__Svg" focusable="false" aria-hidden="true"> <circle cx="15" cy="15" r="15"> <animate attributename="r" from="15" to="15" begin="0s" dur="0.8s" values="15;9;15" calcmode="linear" repeatcount="indefinite"></animate> <animate attributename="fill-opacity" from="1" to="1" begin="0s" dur="0.8s" values="1;.5;1" calcmode="linear" repeatcount="indefinite"></animate> </circle> <circle cx="60" cy="15" r="9" fill-opacity="0.3"> <animate attributename="r" from="9" to="9" begin="0s" dur="0.8s" values="9;15;9" calcmode="linear" repeatcount="indefinite"></animate> <animate attributename="fill-opacity" from="0.5" to="0.5" begin="0s" dur="0.8s" values=".5;1;.5" calcmode="linear" repeatcount="indefinite"></animate> </circle> <circle cx="105" cy="15" r="15"> <animate attributename="r" from="15" to="15" begin="0s" dur="0.8s" values="15;9;15" calcmode="linear" repeatcount="indefinite"></animate> <animate attributename="fill-opacity" from="1" to="1" begin="0s" dur="0.8s" values="1;.5;1" calcmode="linear" repeatcount="indefinite"></animate> </circle></svg> </div></div></button></div> <div role="alert" aria-live="assertive" aria-atomic="true" data-controller="midwest-notification" data-action="midwest-countdown-timer:complete->midwest-notification#close" class="midwest-notification animated theme-red"> <div class="midwest-notification__body"> <div class="midwest-icon midwest-notification__icon"> <div class="midwest-icon-inner"> <svg xmlns="http://www.w3.org/2000/svg" class="Midwest-Icon__Svg" viewbox="0 0 512 512" focusable="false" role="img" aria-label="Warning"><title>Warning</title><path d="M449.07 399.08L278.64 82.58c-12.08-22.44-44.26-22.44-56.35 0L51.87 399.08A32 32 0 0080 446.25h340.89a32 32 0 0028.18-47.17zm-198.6-1.83a20 20 0 1120-20 20 20 0 01-20 20zm21.72-201.15l-5.74 122a16 16 0 01-32 0l-5.74-121.95a21.73 21.73 0 0121.5-22.69h.21a21.74 21.74 0 0121.73 22.7z"></path></svg> </div></div> <div class="midwest-notification__content"> <p class="midwest-notification__title">Error</p> <div class="midwest-notification__message">Something went wrong. Please try again.</div> </div> </div> <button data-action="midwest-notification#close" class="midwest-button variant-default size-small pill contrast theme-primary" name="button"> <span class="midwest-button-content"> <span class="sr-only">Dismisses in 8 seconds</span> <div data-controller="midwest-countdown-timer" data-midwest-countdown-timer-seconds-value="8" style="--duration: 8s; --circumference: 69.115;" aria-hidden="true" class="midwest-countdown-timer"> <svg viewBox="0 0 28 28" width="1em" height="1em"> <circle class="midwest-countdown-timer__track" cx="14" cy="14" r="11" /> <circle class="midwest-countdown-timer__progress" cx="14" cy="14" r="11" stroke-dasharray="69.115" /> </svg></div></span><div class="midwest-loading-icon" role="img" aria-label="Loading" aria-hidden="true" style="display: none"> <div class="midwest-loading-icon-inner"> <!-- By Sam Herbert (@sherb), for everyone. More @ http://goo.gl/7AJzbL --><svg viewbox="0 0 120 30" xmlns="http://www.w3.org/2000/svg" fill="currentColor" class="Midwest-LoadingIcon__Svg" focusable="false" aria-hidden="true"> <circle cx="15" cy="15" r="15"> <animate attributename="r" from="15" to="15" begin="0s" dur="0.8s" values="15;9;15" calcmode="linear" repeatcount="indefinite"></animate> <animate attributename="fill-opacity" from="1" to="1" begin="0s" dur="0.8s" values="1;.5;1" calcmode="linear" repeatcount="indefinite"></animate> </circle> <circle cx="60" cy="15" r="9" fill-opacity="0.3"> <animate attributename="r" from="9" to="9" begin="0s" dur="0.8s" values="9;15;9" calcmode="linear" repeatcount="indefinite"></animate> <animate attributename="fill-opacity" from="0.5" to="0.5" begin="0s" dur="0.8s" values=".5;1;.5" calcmode="linear" repeatcount="indefinite"></animate> </circle> <circle cx="105" cy="15" r="15"> <animate attributename="r" from="15" to="15" begin="0s" dur="0.8s" values="15;9;15" calcmode="linear" repeatcount="indefinite"></animate> <animate attributename="fill-opacity" from="1" to="1" begin="0s" dur="0.8s" values="1;.5;1" calcmode="linear" repeatcount="indefinite"></animate> </circle></svg> </div></div></button></div> <div role="alert" aria-live="assertive" aria-atomic="true" data-controller="midwest-notification" data-action="midwest-countdown-timer:complete->midwest-notification#close" class="midwest-notification animated theme-orange"> <div class="midwest-notification__body"> <div class="midwest-icon midwest-notification__icon"> <div class="midwest-icon-inner"> <svg xmlns="http://www.w3.org/2000/svg" class="Midwest-Icon__Svg" viewbox="0 0 512 512" focusable="false" role="img" aria-label="Warning"><title>Warning</title><path d="M449.07 399.08L278.64 82.58c-12.08-22.44-44.26-22.44-56.35 0L51.87 399.08A32 32 0 0080 446.25h340.89a32 32 0 0028.18-47.17zm-198.6-1.83a20 20 0 1120-20 20 20 0 01-20 20zm21.72-201.15l-5.74 122a16 16 0 01-32 0l-5.74-121.95a21.73 21.73 0 0121.5-22.69h.21a21.74 21.74 0 0121.73 22.7z"></path></svg> </div></div> <div class="midwest-notification__content"> <p class="midwest-notification__title">Warning</p> <div class="midwest-notification__message">Your session will expire in 5 minutes.</div> </div> </div> <button data-action="midwest-notification#close" class="midwest-button variant-default size-small pill contrast theme-primary" name="button"> <span class="midwest-button-content"> <span class="sr-only">Dismisses in 8 seconds</span> <div data-controller="midwest-countdown-timer" data-midwest-countdown-timer-seconds-value="8" style="--duration: 8s; --circumference: 69.115;" aria-hidden="true" class="midwest-countdown-timer"> <svg viewBox="0 0 28 28" width="1em" height="1em"> <circle class="midwest-countdown-timer__track" cx="14" cy="14" r="11" /> <circle class="midwest-countdown-timer__progress" cx="14" cy="14" r="11" stroke-dasharray="69.115" /> </svg></div></span><div class="midwest-loading-icon" role="img" aria-label="Loading" aria-hidden="true" style="display: none"> <div class="midwest-loading-icon-inner"> <!-- By Sam Herbert (@sherb), for everyone. More @ http://goo.gl/7AJzbL --><svg viewbox="0 0 120 30" xmlns="http://www.w3.org/2000/svg" fill="currentColor" class="Midwest-LoadingIcon__Svg" focusable="false" aria-hidden="true"> <circle cx="15" cy="15" r="15"> <animate attributename="r" from="15" to="15" begin="0s" dur="0.8s" values="15;9;15" calcmode="linear" repeatcount="indefinite"></animate> <animate attributename="fill-opacity" from="1" to="1" begin="0s" dur="0.8s" values="1;.5;1" calcmode="linear" repeatcount="indefinite"></animate> </circle> <circle cx="60" cy="15" r="9" fill-opacity="0.3"> <animate attributename="r" from="9" to="9" begin="0s" dur="0.8s" values="9;15;9" calcmode="linear" repeatcount="indefinite"></animate> <animate attributename="fill-opacity" from="0.5" to="0.5" begin="0s" dur="0.8s" values=".5;1;.5" calcmode="linear" repeatcount="indefinite"></animate> </circle> <circle cx="105" cy="15" r="15"> <animate attributename="r" from="15" to="15" begin="0s" dur="0.8s" values="15;9;15" calcmode="linear" repeatcount="indefinite"></animate> <animate attributename="fill-opacity" from="1" to="1" begin="0s" dur="0.8s" values="1;.5;1" calcmode="linear" repeatcount="indefinite"></animate> </circle></svg> </div></div></button></div> <div role="status" aria-live="polite" aria-atomic="true" data-controller="midwest-notification" data-action="midwest-countdown-timer:complete->midwest-notification#close" class="midwest-notification animated theme-cyan"> <div class="midwest-notification__body"> <div class="midwest-icon midwest-notification__icon"> <div class="midwest-icon-inner"> <svg xmlns="http://www.w3.org/2000/svg" class="Midwest-Icon__Svg" viewbox="0 0 512 512" focusable="false" role="img" aria-label="Information circle"><title>Information circle</title><path d="M256 56C145.72 56 56 145.72 56 256s89.72 200 200 200 200-89.72 200-200S366.28 56 256 56zm0 82a26 26 0 11-26 26 26 26 0 0126-26zm48 226h-88a16 16 0 010-32h28v-88h-16a16 16 0 010-32h32a16 16 0 0116 16v104h28a16 16 0 010 32z"></path></svg> </div></div> <div class="midwest-notification__content"> <p class="midwest-notification__title">Info</p> <div class="midwest-notification__message">A new version is available.</div> </div> </div> <button data-action="midwest-notification#close" class="midwest-button variant-default size-small pill contrast theme-primary" name="button"> <span class="midwest-button-content"> <span class="sr-only">Dismisses in 8 seconds</span> <div data-controller="midwest-countdown-timer" data-midwest-countdown-timer-seconds-value="8" style="--duration: 8s; --circumference: 69.115;" aria-hidden="true" class="midwest-countdown-timer"> <svg viewBox="0 0 28 28" width="1em" height="1em"> <circle class="midwest-countdown-timer__track" cx="14" cy="14" r="11" /> <circle class="midwest-countdown-timer__progress" cx="14" cy="14" r="11" stroke-dasharray="69.115" /> </svg></div></span><div class="midwest-loading-icon" role="img" aria-label="Loading" aria-hidden="true" style="display: none"> <div class="midwest-loading-icon-inner"> <!-- By Sam Herbert (@sherb), for everyone. More @ http://goo.gl/7AJzbL --><svg viewbox="0 0 120 30" xmlns="http://www.w3.org/2000/svg" fill="currentColor" class="Midwest-LoadingIcon__Svg" focusable="false" aria-hidden="true"> <circle cx="15" cy="15" r="15"> <animate attributename="r" from="15" to="15" begin="0s" dur="0.8s" values="15;9;15" calcmode="linear" repeatcount="indefinite"></animate> <animate attributename="fill-opacity" from="1" to="1" begin="0s" dur="0.8s" values="1;.5;1" calcmode="linear" repeatcount="indefinite"></animate> </circle> <circle cx="60" cy="15" r="9" fill-opacity="0.3"> <animate attributename="r" from="9" to="9" begin="0s" dur="0.8s" values="9;15;9" calcmode="linear" repeatcount="indefinite"></animate> <animate attributename="fill-opacity" from="0.5" to="0.5" begin="0s" dur="0.8s" values=".5;1;.5" calcmode="linear" repeatcount="indefinite"></animate> </circle> <circle cx="105" cy="15" r="15"> <animate attributename="r" from="15" to="15" begin="0s" dur="0.8s" values="15;9;15" calcmode="linear" repeatcount="indefinite"></animate> <animate attributename="fill-opacity" from="1" to="1" begin="0s" dur="0.8s" values="1;.5;1" calcmode="linear" repeatcount="indefinite"></animate> </circle></svg> </div></div></button></div> <div role="status" aria-live="polite" aria-atomic="true" data-controller="midwest-notification" data-action="midwest-countdown-timer:complete->midwest-notification#close" class="midwest-notification animated theme-primary"> <div class="midwest-notification__body"> <div class="midwest-notification__content"> <p class="midwest-notification__title">Default</p> <div class="midwest-notification__message">No state specified.</div> </div> </div> <button data-action="midwest-notification#close" class="midwest-button variant-default size-small pill contrast theme-primary" name="button"> <span class="midwest-button-content"> <span class="sr-only">Dismisses in 8 seconds</span> <div data-controller="midwest-countdown-timer" data-midwest-countdown-timer-seconds-value="8" style="--duration: 8s; --circumference: 69.115;" aria-hidden="true" class="midwest-countdown-timer"> <svg viewBox="0 0 28 28" width="1em" height="1em"> <circle class="midwest-countdown-timer__track" cx="14" cy="14" r="11" /> <circle class="midwest-countdown-timer__progress" cx="14" cy="14" r="11" stroke-dasharray="69.115" /> </svg></div></span><div class="midwest-loading-icon" role="img" aria-label="Loading" aria-hidden="true" style="display: none"> <div class="midwest-loading-icon-inner"> <!-- By Sam Herbert (@sherb), for everyone. More @ http://goo.gl/7AJzbL --><svg viewbox="0 0 120 30" xmlns="http://www.w3.org/2000/svg" fill="currentColor" class="Midwest-LoadingIcon__Svg" focusable="false" aria-hidden="true"> <circle cx="15" cy="15" r="15"> <animate attributename="r" from="15" to="15" begin="0s" dur="0.8s" values="15;9;15" calcmode="linear" repeatcount="indefinite"></animate> <animate attributename="fill-opacity" from="1" to="1" begin="0s" dur="0.8s" values="1;.5;1" calcmode="linear" repeatcount="indefinite"></animate> </circle> <circle cx="60" cy="15" r="9" fill-opacity="0.3"> <animate attributename="r" from="9" to="9" begin="0s" dur="0.8s" values="9;15;9" calcmode="linear" repeatcount="indefinite"></animate> <animate attributename="fill-opacity" from="0.5" to="0.5" begin="0s" dur="0.8s" values=".5;1;.5" calcmode="linear" repeatcount="indefinite"></animate> </circle> <circle cx="105" cy="15" r="15"> <animate attributename="r" from="15" to="15" begin="0s" dur="0.8s" values="15;9;15" calcmode="linear" repeatcount="indefinite"></animate> <animate attributename="fill-opacity" from="1" to="1" begin="0s" dur="0.8s" values="1;.5;1" calcmode="linear" repeatcount="indefinite"></animate> </circle></svg> </div></div></button></div></turbo-frame></div><template id="demo-notification"> <div role="status" aria-live="polite" aria-atomic="true" data-controller="midwest-notification" class="midwest-notification animated theme-green"> <div class="midwest-notification__body"> <div class="midwest-icon midwest-notification__icon"> <div class="midwest-icon-inner"> <svg xmlns="http://www.w3.org/2000/svg" class="Midwest-Icon__Svg" viewbox="0 0 512 512" focusable="false" role="img" aria-label="Checkmark circle"><title>Checkmark circle</title><path d="M256 48C141.31 48 48 141.31 48 256s93.31 208 208 208 208-93.31 208-208S370.69 48 256 48zm108.25 138.29l-134.4 160a16 16 0 01-12 5.71h-.27a16 16 0 01-11.89-5.3l-57.6-64a16 16 0 1123.78-21.4l45.29 50.32 122.59-145.91a16 16 0 0124.5 20.58z"></path></svg> </div></div> <div class="midwest-notification__content"> <p class="midwest-notification__title">Just arrived!</p> <div class="midwest-notification__message">Prepended after 5 seconds — just like a Turbo Stream would.</div> </div> </div> <button data-action="midwest-notification#close" class="midwest-button variant-default size-small pill contrast theme-primary" name="button"> <span class="midwest-button-content"> <span class="sr-only">Dismiss notification</span> <div class="midwest-icon text-xl"> <div class="midwest-icon-inner"> <svg xmlns="http://www.w3.org/2000/svg" class="Midwest-Icon__Svg" viewbox="0 0 512 512" focusable="false" role="img" aria-label="Close"><title>Close</title><path d="M289.94 256l95-95A24 24 0 00351 127l-95 95-95-95a24 24 0 00-34 34l95 95-95 95a24 24 0 1034 34l95-95 95 95a24 24 0 0034-34z"></path></svg> </div></div></span><div class="midwest-loading-icon" role="img" aria-label="Loading" aria-hidden="true" style="display: none"> <div class="midwest-loading-icon-inner"> <!-- By Sam Herbert (@sherb), for everyone. More @ http://goo.gl/7AJzbL --><svg viewbox="0 0 120 30" xmlns="http://www.w3.org/2000/svg" fill="currentColor" class="Midwest-LoadingIcon__Svg" focusable="false" aria-hidden="true"> <circle cx="15" cy="15" r="15"> <animate attributename="r" from="15" to="15" begin="0s" dur="0.8s" values="15;9;15" calcmode="linear" repeatcount="indefinite"></animate> <animate attributename="fill-opacity" from="1" to="1" begin="0s" dur="0.8s" values="1;.5;1" calcmode="linear" repeatcount="indefinite"></animate> </circle> <circle cx="60" cy="15" r="9" fill-opacity="0.3"> <animate attributename="r" from="9" to="9" begin="0s" dur="0.8s" values="9;15;9" calcmode="linear" repeatcount="indefinite"></animate> <animate attributename="fill-opacity" from="0.5" to="0.5" begin="0s" dur="0.8s" values=".5;1;.5" calcmode="linear" repeatcount="indefinite"></animate> </circle> <circle cx="105" cy="15" r="15"> <animate attributename="r" from="15" to="15" begin="0s" dur="0.8s" values="15;9;15" calcmode="linear" repeatcount="indefinite"></animate> <animate attributename="fill-opacity" from="1" to="1" begin="0s" dur="0.8s" values="1;.5;1" calcmode="linear" repeatcount="indefinite"></animate> </circle></svg> </div></div></button></div></template><script> setTimeout(() => { const frame = document.getElementById('midwest-notifications') const tpl = document.getElementById('demo-notification') if (frame && tpl) frame.prepend(tpl.content.cloneNode(true)) }, 5000)</script>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
<%# Demonstrates the notifications container with Turbo Stream prepend behavior. A timer injects a new notification after 5 seconds to show the stacking animation. %><%= midwest_notifications_container do %> <%= midwest_notification(state: :info, title: 'Tip', countdown: 8.seconds) { 'Dismiss me, then wait for another to arrive.' } %> <%= midwest_notification(state: :success, title: 'Success', countdown: 8.seconds) { 'Your changes were saved.' } %> <%= midwest_notification(state: :error, title: 'Error', countdown: 8.seconds) { 'Something went wrong. Please try again.' } %> <%= midwest_notification(state: :warning, title: 'Warning', countdown: 8.seconds) { 'Your session will expire in 5 minutes.' } %> <%= midwest_notification(state: :info, title: 'Info', countdown: 8.seconds) { 'A new version is available.' } %> <%= midwest_notification(title: 'Default', countdown: 8.seconds) { 'No state specified.' } %><% end %><template id="demo-notification"> <%= midwest_notification(state: :success, title: 'Just arrived!') { 'Prepended after 5 seconds — just like a Turbo Stream would.' } %></template><script> setTimeout(() => { const frame = document.getElementById('midwest-notifications') const tpl = document.getElementById('demo-notification') if (frame && tpl) frame.prepend(tpl.content.cloneNode(true)) }, 5000)</script>Turbo Stream container
Use midwest_notifications_container in your layout to create a fixed
container. Prepend notifications into it via Turbo Streams from the
server.
No params configured.
No assets to display.
Add a .js or .css file alongside the component to see it here.
Figma embed for Notification/container
Annotate a preview to embed its Figma design here:
@figma "https://figma.com/..."