Code example
When using toasts, add the seperate messages to the ox-toast-wrapper
parent. This is best placed directly inside the ox-layout__main__content
.
Example
-
Quick tip
-
Good news
-
Warning! You could do it, but I wouldn’t recommend it.
-
Bad news
-
Updates available, please refresh the website to apply new features.
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
<ul class="ox-toast-wrapper">
<li class="ox-toast">
<span class="ox-icon ox-toast__icon ox-icon--lightbulb"></span>
<div class="ox-toast__content">
<p class="ox-toast__info">Quick tip</p>
</div>
<div class="ox-toast__actions">
<button type="button" class="ox-button ox-button--plain ox-button--small ox-js-toast__close" data-dismiss="toast" aria-label="Close">
<span class="ox-icon ox-icon--close ox-icon--small"></span>
</button>
</div>
</li>
<li class="ox-toast ox-toast--success">
<span class="ox-icon ox-toast__icon ox-icon--thumb-up"></span>
<div class="ox-toast__content">
<p class="ox-toast__info">Good news</p>
</div>
<div class="ox-toast__actions">
<button type="button" class="ox-button ox-button--plain ox-button--small ox-js-toast__close" data-dismiss="toast" aria-label="Close">
<span class="ox-icon ox-icon--close ox-icon--small"></span>
</button>
</div>
</li>
<li class="ox-toast ox-toast--warning">
<span class="ox-icon ox-toast__icon ox-icon--danger"></span>
<div class="ox-toast__content">
<p class="ox-toast__info">Warning! You could do it, but I wouldn’t recommend it.</p>
</div>
<div class="ox-toast__actions">
<button type="button" class="ox-button ox-button--plain ox-button--small ox-js-toast__close" data-dismiss="toast" aria-label="Close">
<span class="ox-icon ox-icon--close ox-icon--small"></span>
</button>
</div>
</li>
<li class="ox-toast ox-toast--error">
<span class="ox-icon ox-toast__icon ox-icon--error"></span>
<div class="ox-toast__content">
<p class="ox-toast__info">Bad news</p>
</div>
<div class="ox-toast__actions">
<button type="button" class="ox-button ox-button--plain ox-button--small ox-js-toast__close" data-dismiss="toast" aria-label="Close">
<span class="ox-icon ox-icon--close ox-icon--small"></span>
</button>
</div>
</li>
<li class="ox-toast ox-toast--update">
<span class="ox-icon ox-toast__icon ox-icon--info"></span>
<div class="ox-toast__content">
<p class="ox-toast__info">Updates available, please refresh the website to apply new features.</p>
</div>
<div class="ox-toast__actions">
<button type="button" class="ox-button ox-button--plain ox-button--small">
<span class="ox-icon ox-icon--refresh ox-icon--small"></span>
</button>
<button type="button" class="ox-button ox-button--plain ox-button--small ox-js-toast__close" data-dismiss="toast" aria-label="Close">
<span class="ox-icon ox-icon--close ox-icon--small"></span>
</button>
</div>
</li>
</ul>