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/src/pages/en/components/snackbar-queue.md
+63-2
Original file line number
Diff line number
Diff line change
@@ -10,22 +10,24 @@ related:
10
10
- /components/snackbars/
11
11
- /components/defaults-providers/
12
12
features:
13
-
github: /labs/VSnackbarQueue/
13
+
github: /components/VSnackbarQueue/
14
14
label: 'C: VSnackbarQueue'
15
15
report: true
16
16
spec: https://m2.material.io/components/snackbars
17
17
---
18
18
19
19
# Snackbar Queue
20
20
21
-
The `v-snackbar-queue` component is used to queue up multiple snackbar messages to be displayed to the user. Snackbars support positioning, removal delay, and callbacks.
21
+
The `v-snackbar-queue` component is used to display a sequence of messages to the user.
22
22
23
23
<PageFeatures />
24
24
25
25
<DocIntroducedversion="3.7.0" />
26
26
27
27
## Usage
28
28
29
+
Messages are passed as an array of strings to `v-model`, when a message is displayed it will be removed from the start of the array.
30
+
29
31
<ExamplesUsagename="v-snackbar-queue" />
30
32
31
33
<PromotedEntry />
@@ -38,3 +40,62 @@ The `v-snackbar-queue` component is used to queue up multiple snackbar messages
38
40
|[v-snackbar](/api/v-snackbar/)| The actual Snackbar Component |
39
41
40
42
<ApiInlinehide-links />
43
+
44
+
## Examples
45
+
46
+
### Additional props
47
+
48
+
Snackbar props can be set either on the queue to apply to all messages:
49
+
50
+
```html
51
+
<v-snackbar-queuetimeout="2000"color="error" />
52
+
```
53
+
54
+
Or individual messages as objects:
55
+
56
+
```js
57
+
queue.push({
58
+
text:text.value,
59
+
timeout:2000,
60
+
color:'error',
61
+
})
62
+
```
63
+
64
+
### Global state
65
+
66
+
You can use pinia or vuex to display messages from any component:
0 commit comments