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: docs/4.0/components/toast.mdx
+14-14Lines changed: 14 additions & 14 deletions
Original file line number
Diff line number
Diff line change
@@ -35,7 +35,7 @@ To encourage extensible and predictable toasts, we recommend a header and body.
35
35
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.
36
36
37
37
<Example>
38
-
<CToasttitle="CoreUI for React.js"autohide={false}>
38
+
<CToasttitle="CoreUI for React.js"autohide={false}visible={true}>
39
39
<CToastHeaderclose>
40
40
<svg
41
41
className="rounded me-2"
@@ -56,7 +56,7 @@ Toasts are as flexible as you need and have very little required markup. At a mi
56
56
</Example>
57
57
58
58
```jsx
59
-
<CToast title="CoreUI for React.js" autohide={false}>
59
+
<CToast title="CoreUI for React.js" autohide={false} visible={true}>
60
60
<CToastHeader close>
61
61
<svg
62
62
className="rounded me-2"
@@ -147,7 +147,7 @@ return (
147
147
Toasts are slightly translucent to blend in with what's below them.
148
148
149
149
<ExampleclassName="bg-dark border-0">
150
-
<CToasttitle="CoreUI for React.js"autohide={false}>
150
+
<CToasttitle="CoreUI for React.js"autohide={false}visible={true}>
151
151
<CToastHeaderclose>
152
152
<svg
153
153
className="rounded me-2"
@@ -168,7 +168,7 @@ Toasts are slightly translucent to blend in with what's below them.
168
168
</Example>
169
169
170
170
```jsx
171
-
<CToast title="CoreUI for React.js" autohide={false}>
171
+
<CToast title="CoreUI for React.js" autohide={false} visible={true}>
172
172
<CToastHeader close>
173
173
<svg
174
174
className="rounded me-2"
@@ -194,7 +194,7 @@ You can stack toasts by wrapping them in a toast container, which will verticall
194
194
195
195
<Example>
196
196
<CToaster>
197
-
<CToasttitle="CoreUI for React.js"autohide={false}>
197
+
<CToasttitle="CoreUI for React.js"autohide={false}visible={true}>
198
198
<CToastHeaderclose>
199
199
<svg
200
200
className="rounded me-2"
@@ -212,7 +212,7 @@ You can stack toasts by wrapping them in a toast container, which will verticall
212
212
</CToastHeader>
213
213
<CToastBody>Hello, world! This is a toast message.</CToastBody>
214
214
</CToast>
215
-
<CToasttitle="CoreUI for React.js"autohide={false}>
215
+
<CToasttitle="CoreUI for React.js"autohide={false}visible={true}>
216
216
<CToastHeaderclose>
217
217
<svg
218
218
className="rounded me-2"
@@ -235,7 +235,7 @@ You can stack toasts by wrapping them in a toast container, which will verticall
235
235
236
236
```jsx
237
237
<CToaster>
238
-
<CToast title="CoreUI for React.js" autohide={false}>
238
+
<CToast title="CoreUI for React.js" autohide={false} visible={true}>
239
239
<CToastHeader close>
240
240
<svg
241
241
className="rounded me-2"
@@ -253,7 +253,7 @@ You can stack toasts by wrapping them in a toast container, which will verticall
253
253
</CToastHeader>
254
254
<CToastBody>Hello, world! This is a toast message.</CToastBody>
255
255
</CToast>
256
-
<CToast title="CoreUI for React.js" autohide={false}>
256
+
<CToast title="CoreUI for React.js" autohide={false} visible={true}>
257
257
<CToastHeader close>
258
258
<svg
259
259
className="rounded me-2"
@@ -279,7 +279,7 @@ You can stack toasts by wrapping them in a toast container, which will verticall
279
279
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.
<CToastBody>Hello, world! This is a toast message.</CToastBody>
294
294
<CToastClose className="me-2 m-auto"/>
@@ -299,7 +299,7 @@ Customize your toasts by removing sub-components, tweaking them with [utilities]
299
299
Alternatively, you can also add additional controls and components to toasts.
300
300
301
301
<Example>
302
-
<CToastautohide={false}>
302
+
<CToastautohide={false}visible={true}>
303
303
<CToastBody>
304
304
Hello, world! This is a toast message.
305
305
<divclassName="mt-2 pt-2 border-top">
@@ -315,7 +315,7 @@ Alternatively, you can also add additional controls and components to toasts.
315
315
</Example>
316
316
317
317
```jsx
318
-
<CToast autohide={false}>
318
+
<CToast autohide={false} visible={true}>
319
319
<CToastBody>
320
320
Hello, world! This is a toast message.
321
321
<div className="mt-2 pt-2 border-top">
@@ -335,7 +335,7 @@ Alternatively, you can also add additional controls and components to toasts.
335
335
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