@@ -8,10 +8,16 @@ block scripts
8
8
script( src ='js/toasts.js' )
9
9
10
10
block breadcrumb
11
- + breadcrumb(['Home' , 'Components' , 'Notifications' ], 'Toasts' )
11
+ + breadcrumb(
12
+ [
13
+ { href: ' #' , label: ' Home' },
14
+ { label: ' Components' },
15
+ { label: ' Notifications' },
16
+ 'Toasts'
17
+ ]
18
+ )
12
19
13
20
block view
14
-
15
21
.card.mb-4
16
22
.card-header
17
23
strong Toast
@@ -20,16 +26,15 @@ block view
20
26
p.text-body-secondary.small
21
27
| Toasts are as flexible as you need and have very little required markup. At a minimum, we require a single element to contain your “toasted” content and strongly encourage a dismiss button.
22
28
+ example('https://coreui.io/docs/components/toasts/#basic' )
23
- .bg-light.p-3
24
- .toast.fade.show ( role ='alert' aria-live ='assertive' aria-atomic ='true' )
25
- .toast-header
26
- svg.docs-placeholder-img.rounded.me-2 ( width ='20' height ='20' xmlns ='http://www.w3.org/2000/svg' aria-hidden ='true' preserveAspectRatio ='xMidYMid slice' focusable ='false' )
27
- rect( width ='100%' height ='100%' fill ='#007aff' )
28
- strong.me-auto Bootstrap
29
- small 11 mins ago
30
- button.btn-close ( type ='button' data-coreui-dismiss ='toast' aria-label ='Close' )
31
- .toast-body
32
- | Hello, world! This is a toast message.
29
+ .toast.fade.show ( role ='alert' aria-live ='assertive' aria-atomic ='true' )
30
+ .toast-header
31
+ svg.docs-placeholder-img.rounded.me-2 ( width ='20' height ='20' xmlns ='http://www.w3.org/2000/svg' aria-hidden ='true' preserveAspectRatio ='xMidYMid slice' focusable ='false' )
32
+ rect( width ='100%' height ='100%' fill ='#007aff' )
33
+ strong.me-auto Bootstrap
34
+ small 11 mins ago
35
+ button.btn-close ( type ='button' data-coreui-dismiss ='toast' aria-label ='Close' )
36
+ .toast-body
37
+ | Hello, world! This is a toast message.
33
38
.card.mb-4
34
39
.card-header
35
40
strong Toast
@@ -58,17 +63,16 @@ block view
58
63
.card-body
59
64
p.text-body-secondary.small
60
65
| Toasts are slightly translucent, too, so they blend over whatever they might appear over.
61
- + example('https://coreui.io/docs/components/toasts/#translucent' )
62
- .bg-dark.p-3
63
- .toast.fade.show ( role ='alert' aria-live ='assertive' aria-atomic ='true' )
64
- .toast-header
65
- svg.docs-placeholder-img.rounded.me-2 ( width ='20' height ='20' xmlns ='http://www.w3.org/2000/svg' aria-hidden ='true' preserveAspectRatio ='xMidYMid slice' focusable ='false' )
66
- rect( width ='100%' height ='100%' fill ='#007aff' )
67
- strong.me-auto Bootstrap
68
- small.text-body-secondary 11 mins ago
69
- button.btn-close ( type ='button' data-coreui-dismiss ='toast' aria-label ='Close' )
70
- .toast-body
71
- | Hello, world! This is a toast message.
66
+ + example('https://coreui.io/docs/components/toasts/#translucent' , 'bg-dark' )
67
+ .toast.fade.show ( role ='alert' aria-live ='assertive' aria-atomic ='true' )
68
+ .toast-header
69
+ svg.docs-placeholder-img.rounded.me-2 ( width ='20' height ='20' xmlns ='http://www.w3.org/2000/svg' aria-hidden ='true' preserveAspectRatio ='xMidYMid slice' focusable ='false' )
70
+ rect( width ='100%' height ='100%' fill ='#007aff' )
71
+ strong.me-auto Bootstrap
72
+ small.text-body-secondary 11 mins ago
73
+ button.btn-close ( type ='button' data-coreui-dismiss ='toast' aria-label ='Close' )
74
+ .toast-body
75
+ | Hello, world! This is a toast message.
72
76
.card.mb-4
73
77
.card-header
74
78
strong Toast
@@ -77,26 +81,25 @@ block view
77
81
p.text-body-secondary.small
78
82
| You can stack toasts by wrapping them in a toast container, which will vertically add some spacing.
79
83
+ example('https://coreui.io/docs/components/toasts/#stacking' )
80
- .bg-light.p-3
81
- .toast-container
82
- .toast.fade.show ( role ='alert' aria-live ='assertive' aria-atomic ='true' )
83
- .toast-header
84
- svg.docs-placeholder-img.rounded.me-2 ( width ='20' height ='20' xmlns ='http://www.w3.org/2000/svg' aria-hidden ='true' preserveAspectRatio ='xMidYMid slice' focusable ='false' )
85
- rect( width ='100%' height ='100%' fill ='#007aff' )
86
- strong.me-auto Bootstrap
87
- small.text-body-secondary just now
88
- button.btn-close ( type ='button' data-coreui-dismiss ='toast' aria-label ='Close' )
89
- .toast-body
90
- | See? Just like this.
91
- .toast.fade.show ( role ='alert' aria-live ='assertive' aria-atomic ='true' )
92
- .toast-header
93
- svg.docs-placeholder-img.rounded.me-2 ( width ='20' height ='20' xmlns ='http://www.w3.org/2000/svg' aria-hidden ='true' preserveAspectRatio ='xMidYMid slice' focusable ='false' )
94
- rect( width ='100%' height ='100%' fill ='#007aff' )
95
- strong.me-auto Bootstrap
96
- small.text-body-secondary 2 seconds ago
97
- button.btn-close ( type ='button' data-coreui-dismiss ='toast' aria-label ='Close' )
98
- .toast-body
99
- | Heads up, toasts will stack automatically
84
+ .toast-container.position-static
85
+ .toast.fade.show ( role ='alert' aria-live ='assertive' aria-atomic ='true' )
86
+ .toast-header
87
+ svg.docs-placeholder-img.rounded.me-2 ( width ='20' height ='20' xmlns ='http://www.w3.org/2000/svg' aria-hidden ='true' preserveAspectRatio ='xMidYMid slice' focusable ='false' )
88
+ rect( width ='100%' height ='100%' fill ='#007aff' )
89
+ strong.me-auto Bootstrap
90
+ small.text-body-secondary just now
91
+ button.btn-close ( type ='button' data-coreui-dismiss ='toast' aria-label ='Close' )
92
+ .toast-body
93
+ | See? Just like this.
94
+ .toast.fade.show ( role ='alert' aria-live ='assertive' aria-atomic ='true' )
95
+ .toast-header
96
+ svg.docs-placeholder-img.rounded.me-2 ( width ='20' height ='20' xmlns ='http://www.w3.org/2000/svg' aria-hidden ='true' preserveAspectRatio ='xMidYMid slice' focusable ='false' )
97
+ rect( width ='100%' height ='100%' fill ='#007aff' )
98
+ strong.me-auto Bootstrap
99
+ small.text-body-secondary 2 seconds ago
100
+ button.btn-close ( type ='button' data-coreui-dismiss ='toast' aria-label ='Close' )
101
+ .toast-body
102
+ | Heads up, toasts will stack automatically
100
103
.card.mb-4
101
104
.card-header
102
105
strong Toast
@@ -113,21 +116,19 @@ block view
113
116
a( href ='https://coreui.io/docs/utilities/flex/' ) flexbox utilities
114
117
| to adjust the layout.
115
118
+ example('https://coreui.io/docs/components/toasts/#custom-content' )
116
- .bg-light.p-3
117
- .toast.align-items-center.fade.show ( role ='alert' aria-live ='assertive' aria-atomic ='true' )
118
- .d-flex
119
- .toast-body
120
- | Hello, world! This is a toast message.
121
- button.btn-close.me-2.m-auto ( type ='button' data-coreui-dismiss ='toast' aria-label ='Close' )
122
- p.text-body-secondary.small Alternatively, you can also add additional controls and components to toasts.
123
- + example('https://coreui.io/docs/components/toasts/#custom-content' )
124
- .bg-light.p-3
125
- .toast.fade.show ( role ='alert' aria-live ='assertive' aria-atomic ='true' )
119
+ .toast.align-items-center.fade.show ( role ='alert' aria-live ='assertive' aria-atomic ='true' )
120
+ .d-flex
126
121
.toast-body
127
122
| Hello, world! This is a toast message.
128
- .mt-2.pt-2.border-top
129
- button.btn.btn-primary.btn-sm ( type ='button' ) Take action
130
- button.btn.btn-secondary.btn-sm ( type ='button' data-coreui-dismiss ='toast' ) Close
123
+ button.btn-close.me-2.m-auto ( type ='button' data-coreui-dismiss ='toast' aria-label ='Close' )
124
+ p.text-body-secondary.small Alternatively, you can also add additional controls and components to toasts.
125
+ + example('https://coreui.io/docs/components/toasts/#custom-content' )
126
+ .toast.fade.show ( role ='alert' aria-live ='assertive' aria-atomic ='true' )
127
+ .toast-body
128
+ | Hello, world! This is a toast message.
129
+ .mt-2.pt-2.border-top
130
+ button.btn.btn-primary.btn-sm ( type ='button' ) Take action
131
+ button.btn.btn-secondary.btn-sm ( type ='button' data-coreui-dismiss ='toast' ) Close
131
132
.card.mb-4
132
133
.card-header
133
134
strong Toast
@@ -150,10 +151,9 @@ block view
150
151
code .border-0
151
152
| .
152
153
+ example('https://coreui.io/docs/components/toasts/#color-schemes' )
153
- .bg-light.p-3
154
- .toast.align-items-center.text-white.bg-primary.border-0.fade.show ( role ='alert' aria-live ='assertive' aria-atomic ='true' )
155
- .d-flex
156
- .toast-body
157
- | Hello, world! This is a toast message.
158
- button.btn-close.btn-close-white.me-2.m-auto ( type ='button' data-coreui-dismiss ='toast' aria-label ='Close' )
154
+ .toast.align-items-center.text-white.bg-primary.border-0.fade.show ( role ='alert' aria-live ='assertive' aria-atomic ='true' )
155
+ .d-flex
156
+ .toast-body
157
+ | Hello, world! This is a toast message.
158
+ button.btn-close.btn-close-white.me-2.m-auto ( type ='button' data-coreui-dismiss ='toast' aria-label ='Close' )
159
159
0 commit comments