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
Copy file name to clipboardExpand all lines: packages/docs/components/toast.md
+17-20
Original file line number
Diff line number
Diff line change
@@ -23,7 +23,7 @@ To encourage extensible and predictable toasts, we recommend a header and body.
23
23
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.
24
24
25
25
::: demo
26
-
<CToast:autohide="false">
26
+
<CToast:autohide="false"visible>
27
27
<CToastHeadercloseButton>
28
28
<svg
29
29
class="rounded me-2"
@@ -42,9 +42,8 @@ Toasts are as flexible as you need and have very little required markup. At a mi
42
42
<CToastBody>Hello, world! This is a toast message.</CToastBody>
43
43
</CToast>
44
44
:::
45
-
46
45
```vue
47
-
<CToast :autohide="false">
46
+
<CToast :autohide="false" visible>
48
47
<CToastHeader closeButton>
49
48
<svg
50
49
class="rounded me-2"
@@ -67,7 +66,7 @@ Toasts are as flexible as you need and have very little required markup. At a mi
67
66
:::demo
68
67
<CButton color="primary" @click="createToast">Send a toast</CButton>
@@ -136,7 +135,7 @@ Toasts are as flexible as you need and have very little required markup. At a mi
136
135
Toasts are slightly translucent to blend in with what's below them.
137
136
138
137
::: demo-dark
139
-
<CToast:autohide="false">
138
+
<CToast:autohide="false"visible>
140
139
<CToastHeadercloseButton>
141
140
<svg
142
141
class="rounded me-2"
@@ -157,7 +156,7 @@ Toasts are slightly translucent to blend in with what's below them.
157
156
:::
158
157
159
158
```vue
160
-
<CToast :autohide="false">
159
+
<CToast :autohide="false" visible>
161
160
<CToastHeader closeButton>
162
161
<svg
163
162
class="rounded me-2"
@@ -182,8 +181,8 @@ Toasts are slightly translucent to blend in with what's below them.
182
181
You can stack toasts by wrapping them in a toast container, which will vertically add some spacing.
183
182
184
183
::: demo
185
-
<CToasterclass="position-relative">
186
-
<CToast:autohide="false">
184
+
<CToasterclass="position-relative">
185
+
<CToast:autohide="false"visible>
187
186
<CToastHeadercloseButton>
188
187
<svg
189
188
class="rounded me-2"
@@ -201,7 +200,7 @@ You can stack toasts by wrapping them in a toast container, which will verticall
201
200
</CToastHeader>
202
201
<CToastBody>Hello, world! This is a toast message.</CToastBody>
203
202
</CToast>
204
-
<CToast:autohide="false">
203
+
<CToast:autohide="false"visible>
205
204
<CToastHeadercloseButton>
206
205
<svg
207
206
class="rounded me-2"
@@ -224,7 +223,7 @@ You can stack toasts by wrapping them in a toast container, which will verticall
224
223
225
224
```vue
226
225
<CToaster>
227
-
<CToast :autohide="false">
226
+
<CToast :autohide="false" visible>
228
227
<CToastHeader closeButton>
229
228
<svg
230
229
class="rounded me-2"
@@ -242,7 +241,7 @@ You can stack toasts by wrapping them in a toast container, which will verticall
242
241
</CToastHeader>
243
242
<CToastBody>Hello, world! This is a toast message.</CToastBody>
244
243
</CToast>
245
-
<CToast :autohide="false">
244
+
<CToast :autohide="false" visible>
246
245
<CToastHeader closeButton>
247
246
<svg
248
247
class="rounded me-2"
@@ -268,16 +267,15 @@ You can stack toasts by wrapping them in a toast container, which will verticall
268
267
Customize your toasts by removing sub-components, tweaking them with [utilities](https://coreui.io/docs/4.0/utilities/api), or by adding your own markup. Here we've created a simpler toast by removing the default `<CToastHeader>`, adding a custom hide icon from [CoreUI Icons](https://icons.coreui.io), and using some [flexbox utilities](https://coreui.io/docs/4.0/utilities/flex) to adjust the layout.
@@ -319,16 +317,15 @@ Alternatively, you can also add additional controls and components to toasts.
319
317
Building on the above example, you can create different toast color schemes with our [color](https://coreui.io/docs/4.0/utilities/colors) and [background](https://coreui.io/docs/4.0//utilities/background) utilities. Here we've set `color="primary"` and added `.text-white` class to the `<Ctoast>`, and then set `white` property to our close button. For a crisp edge, we remove the default border with `.border-0`.
0 commit comments