@patternfly/react-docs 7.6.0-prerelease.7 → 7.6.0-prerelease.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (162) hide show
  1. package/package.json +12 -13
  2. package/patternfly-docs/generated/components/about-modal/react.js +149 -0
  3. package/patternfly-docs/generated/components/accordion/react.js +262 -0
  4. package/patternfly-docs/generated/components/action-list/react.js +144 -0
  5. package/patternfly-docs/generated/components/alert/react-demos.js +56 -0
  6. package/patternfly-docs/generated/components/alert/react.js +1433 -0
  7. package/patternfly-docs/generated/components/avatar/react.js +166 -0
  8. package/patternfly-docs/generated/components/back-to-top/react-demos.js +60 -0
  9. package/patternfly-docs/generated/components/back-to-top/react.js +77 -0
  10. package/patternfly-docs/generated/components/backdrop/react.js +64 -0
  11. package/patternfly-docs/generated/components/background-image/react.js +62 -0
  12. package/patternfly-docs/generated/components/badge/react.js +97 -0
  13. package/patternfly-docs/generated/components/banner/react-demos.js +57 -0
  14. package/patternfly-docs/generated/components/banner/react.js +148 -0
  15. package/patternfly-docs/generated/components/brand/react.js +142 -0
  16. package/patternfly-docs/generated/components/breadcrumb/react.js +206 -0
  17. package/patternfly-docs/generated/components/button/react-demos.js +57 -0
  18. package/patternfly-docs/generated/components/button/react.js +826 -0
  19. package/patternfly-docs/generated/components/card/react-demos.js +201 -0
  20. package/patternfly-docs/generated/components/card/react.js +1015 -0
  21. package/patternfly-docs/generated/components/charts/area-chart/-Victory.js +1350 -0
  22. package/patternfly-docs/generated/components/charts/bar-chart/-Victory.js +1334 -0
  23. package/patternfly-docs/generated/components/charts/box-plot-chart/-Victory.js +1282 -0
  24. package/patternfly-docs/generated/components/charts/bullet-chart/-Victory.js +848 -0
  25. package/patternfly-docs/generated/components/charts/colors-for-charts/-Victory.js +192 -0
  26. package/patternfly-docs/generated/components/charts/donut-chart/-Victory.js +426 -0
  27. package/patternfly-docs/generated/components/charts/donut-utilization-chart/-Victory.js +804 -0
  28. package/patternfly-docs/generated/components/charts/legends/-Victory.js +3230 -0
  29. package/patternfly-docs/generated/components/charts/line-chart/-Victory.js +1178 -0
  30. package/patternfly-docs/generated/components/charts/line-chart/ECharts.js +525 -0
  31. package/patternfly-docs/generated/components/charts/patterns/-Victory.js +3382 -0
  32. package/patternfly-docs/generated/components/charts/pie-chart/-Victory.js +377 -0
  33. package/patternfly-docs/generated/components/charts/resize-observer/-Victory.js +2475 -0
  34. package/patternfly-docs/generated/components/charts/sankey-chart/ECharts.js +538 -0
  35. package/patternfly-docs/generated/components/charts/scatter-chart/-Victory.js +1551 -0
  36. package/patternfly-docs/generated/components/charts/skeletons/-Victory.js +4115 -0
  37. package/patternfly-docs/generated/components/charts/sparkline-chart/-Victory.js +955 -0
  38. package/patternfly-docs/generated/components/charts/stack-chart/-Victory.js +1173 -0
  39. package/patternfly-docs/generated/components/charts/threshold-chart/-Victory.js +1166 -0
  40. package/patternfly-docs/generated/components/charts/tooltips/-Victory.js +413 -0
  41. package/patternfly-docs/generated/components/chip/react-deprecated.js +323 -0
  42. package/patternfly-docs/generated/components/clipboard-copy/react.js +373 -0
  43. package/patternfly-docs/generated/components/code-block/react.js +148 -0
  44. package/patternfly-docs/generated/components/code-editor/react.js +659 -0
  45. package/patternfly-docs/generated/components/compass/react-demos.js +147 -0
  46. package/patternfly-docs/generated/components/compass/react.js +440 -0
  47. package/patternfly-docs/generated/components/content/react.js +248 -0
  48. package/patternfly-docs/generated/components/data-list/react-demos.js +90 -0
  49. package/patternfly-docs/generated/components/data-list/react.js +709 -0
  50. package/patternfly-docs/generated/components/date-and-time/calendar-month/react.js +283 -0
  51. package/patternfly-docs/generated/components/date-and-time/date-and-time-picker/react-demos.js +64 -0
  52. package/patternfly-docs/generated/components/date-and-time/date-picker/react-demos.js +83 -0
  53. package/patternfly-docs/generated/components/date-and-time/date-picker/react.js +395 -0
  54. package/patternfly-docs/generated/components/date-and-time/time-picker/react.js +241 -0
  55. package/patternfly-docs/generated/components/description-list/react-demos.js +58 -0
  56. package/patternfly-docs/generated/components/description-list/react.js +743 -0
  57. package/patternfly-docs/generated/components/divider/react.js +126 -0
  58. package/patternfly-docs/generated/components/drag-and-drop/react-demos.js +351 -0
  59. package/patternfly-docs/generated/components/drag-and-drop/react-deprecated.js +184 -0
  60. package/patternfly-docs/generated/components/drag-and-drop/react.js +137 -0
  61. package/patternfly-docs/generated/components/drawer/react.js +598 -0
  62. package/patternfly-docs/generated/components/dual-list-selector/react-deprecated.js +772 -0
  63. package/patternfly-docs/generated/components/dual-list-selector/react.js +594 -0
  64. package/patternfly-docs/generated/components/empty-state/react.js +199 -0
  65. package/patternfly-docs/generated/components/expandable-section/react-demos.js +65 -0
  66. package/patternfly-docs/generated/components/expandable-section/react.js +408 -0
  67. package/patternfly-docs/generated/components/file-upload/multiple-file-upload/react-demos.js +52 -0
  68. package/patternfly-docs/generated/components/file-upload/multiple-file-upload/react.js +398 -0
  69. package/patternfly-docs/generated/components/file-upload/simple-file-upload/react.js +749 -0
  70. package/patternfly-docs/generated/components/forms/checkbox/react.js +222 -0
  71. package/patternfly-docs/generated/components/forms/form/react.js +1106 -0
  72. package/patternfly-docs/generated/components/forms/form-select/react.js +208 -0
  73. package/patternfly-docs/generated/components/forms/radio/react.js +212 -0
  74. package/patternfly-docs/generated/components/forms/text-area/react.js +160 -0
  75. package/patternfly-docs/generated/components/forms/text-input/react.js +216 -0
  76. package/patternfly-docs/generated/components/helper-text/react-demos.js +180 -0
  77. package/patternfly-docs/generated/components/helper-text/react.js +164 -0
  78. package/patternfly-docs/generated/components/hero/react.js +88 -0
  79. package/patternfly-docs/generated/components/hint/react.js +169 -0
  80. package/patternfly-docs/generated/components/icon/react.js +215 -0
  81. package/patternfly-docs/generated/components/input-group/react.js +182 -0
  82. package/patternfly-docs/generated/components/jump-links/react-demos.js +154 -0
  83. package/patternfly-docs/generated/components/jump-links/react.js +212 -0
  84. package/patternfly-docs/generated/components/label/react-demos.js +57 -0
  85. package/patternfly-docs/generated/components/label/react.js +417 -0
  86. package/patternfly-docs/generated/components/list/react.js +175 -0
  87. package/patternfly-docs/generated/components/login-page/react.js +587 -0
  88. package/patternfly-docs/generated/components/masthead/react-demos.js +79 -0
  89. package/patternfly-docs/generated/components/masthead/react.js +291 -0
  90. package/patternfly-docs/generated/components/menus/application-launcher/react-demos.js +769 -0
  91. package/patternfly-docs/generated/components/menus/context-selector/react-demos.js +665 -0
  92. package/patternfly-docs/generated/components/menus/custom-menus/react-demos.js +187 -0
  93. package/patternfly-docs/generated/components/menus/dropdown/react-templates.js +163 -0
  94. package/patternfly-docs/generated/components/menus/dropdown/react.js +998 -0
  95. package/patternfly-docs/generated/components/menus/menu/react.js +1540 -0
  96. package/patternfly-docs/generated/components/menus/menu-toggle/react.js +747 -0
  97. package/patternfly-docs/generated/components/menus/options-menu/react-demos.js +508 -0
  98. package/patternfly-docs/generated/components/menus/select/react-templates.js +257 -0
  99. package/patternfly-docs/generated/components/menus/select/react.js +998 -0
  100. package/patternfly-docs/generated/components/modal/react-deprecated.js +554 -0
  101. package/patternfly-docs/generated/components/modal/react.js +597 -0
  102. package/patternfly-docs/generated/components/navigation/react-demos.js +356 -0
  103. package/patternfly-docs/generated/components/navigation/react.js +409 -0
  104. package/patternfly-docs/generated/components/notification-badge/react.js +196 -0
  105. package/patternfly-docs/generated/components/notification-drawer/react-demos.js +107 -0
  106. package/patternfly-docs/generated/components/notification-drawer/react.js +394 -0
  107. package/patternfly-docs/generated/components/number-input/react.js +210 -0
  108. package/patternfly-docs/generated/components/overflow-menu/react.js +274 -0
  109. package/patternfly-docs/generated/components/page/react-demos.js +149 -0
  110. package/patternfly-docs/generated/components/page/react.js +1352 -0
  111. package/patternfly-docs/generated/components/pagination/react.js +492 -0
  112. package/patternfly-docs/generated/components/panel/react.js +236 -0
  113. package/patternfly-docs/generated/components/popover/react.js +390 -0
  114. package/patternfly-docs/generated/components/progress/react-demos.js +59 -0
  115. package/patternfly-docs/generated/components/progress/react.js +283 -0
  116. package/patternfly-docs/generated/components/progress-stepper/react-demos.js +45 -0
  117. package/patternfly-docs/generated/components/progress-stepper/react.js +219 -0
  118. package/patternfly-docs/generated/components/search-input/react-demos.js +113 -0
  119. package/patternfly-docs/generated/components/search-input/react.js +263 -0
  120. package/patternfly-docs/generated/components/sidebar/react.js +236 -0
  121. package/patternfly-docs/generated/components/simple-list/react.js +200 -0
  122. package/patternfly-docs/generated/components/skeleton/react-demos.js +44 -0
  123. package/patternfly-docs/generated/components/skeleton/react.js +122 -0
  124. package/patternfly-docs/generated/components/skip-to-content/react.js +73 -0
  125. package/patternfly-docs/generated/components/slider/react.js +309 -0
  126. package/patternfly-docs/generated/components/spinner/react.js +111 -0
  127. package/patternfly-docs/generated/components/switch/react.js +163 -0
  128. package/patternfly-docs/generated/components/table/react-demos.js +355 -0
  129. package/patternfly-docs/generated/components/table/react-deprecated.js +1350 -0
  130. package/patternfly-docs/generated/components/table/react.js +3241 -0
  131. package/patternfly-docs/generated/components/tabs/react-demos.js +108 -0
  132. package/patternfly-docs/generated/components/tabs/react.js +1359 -0
  133. package/patternfly-docs/generated/components/text-input-group/react-demos.js +152 -0
  134. package/patternfly-docs/generated/components/text-input-group/react.js +278 -0
  135. package/patternfly-docs/generated/components/tile/react-deprecated.js +242 -0
  136. package/patternfly-docs/generated/components/timestamp/react.js +283 -0
  137. package/patternfly-docs/generated/components/title/react.js +94 -0
  138. package/patternfly-docs/generated/components/toggle-group/react.js +299 -0
  139. package/patternfly-docs/generated/components/toolbar/react-demos.js +66 -0
  140. package/patternfly-docs/generated/components/toolbar/react.js +932 -0
  141. package/patternfly-docs/generated/components/tooltip/react.js +241 -0
  142. package/patternfly-docs/generated/components/tree-view/react.js +429 -0
  143. package/patternfly-docs/generated/components/truncate/react.js +211 -0
  144. package/patternfly-docs/generated/components/wizard/react-demos.js +87 -0
  145. package/patternfly-docs/generated/components/wizard/react-deprecated.js +788 -0
  146. package/patternfly-docs/generated/components/wizard/react.js +986 -0
  147. package/patternfly-docs/generated/developer-guides/open-ui-automation/react.js +285 -0
  148. package/patternfly-docs/generated/foundations-and-styles/layouts/bullseye/react.js +70 -0
  149. package/patternfly-docs/generated/foundations-and-styles/layouts/flex/react.js +506 -0
  150. package/patternfly-docs/generated/foundations-and-styles/layouts/gallery/react.js +94 -0
  151. package/patternfly-docs/generated/foundations-and-styles/layouts/grid/react.js +272 -0
  152. package/patternfly-docs/generated/foundations-and-styles/layouts/level/react.js +87 -0
  153. package/patternfly-docs/generated/foundations-and-styles/layouts/split/react.js +124 -0
  154. package/patternfly-docs/generated/foundations-and-styles/layouts/stack/react.js +112 -0
  155. package/patternfly-docs/generated/index.js +1769 -0
  156. package/patternfly-docs/generated/patterns/card-view/react-demos.js +78 -0
  157. package/patternfly-docs/generated/patterns/filters/react-demos.js +141 -0
  158. package/patternfly-docs/generated/patterns/password-generator/react-demos.js +51 -0
  159. package/patternfly-docs/generated/patterns/password-strength/react-demos.js +61 -0
  160. package/patternfly-docs/generated/patterns/primary-detail/react-demos.js +124 -0
  161. package/patternfly-docs/generated/patterns/right-to-left/react-demos.js +81 -0
  162. package/LICENSE +0 -21
@@ -0,0 +1,1433 @@
1
+ import React from 'react';
2
+ import { AutoLinkHeader, Example, Link as PatternflyThemeLink } from '@patternfly/documentation-framework/components';
3
+ import '../../../../../react-core/src/components/Alert/examples/./alert.css';
4
+ import { Fragment, useEffect, useState } from 'react';
5
+ import RhUiUsersFillIcon from '@patternfly/react-icons/dist/esm/icons/rh-ui-users-fill-icon';
6
+ import RhUiContainerFillIcon from '@patternfly/react-icons/dist/esm/icons/rh-ui-container-fill-icon';
7
+ import DatabaseIcon from '@patternfly/react-icons/dist/esm/icons/database-icon';
8
+ import RhUiServerStackFillIcon from '@patternfly/react-icons/dist/esm/icons/rh-ui-server-stack-fill-icon';
9
+ import LaptopIcon from '@patternfly/react-icons/dist/esm/icons/laptop-icon';
10
+ import buttonStyles from '@patternfly/react-styles/css/components/Button/button';
11
+ const pageData = {
12
+ "id": "Alert",
13
+ "section": "components",
14
+ "subsection": "",
15
+ "deprecated": false,
16
+ "template": false,
17
+ "beta": false,
18
+ "demo": false,
19
+ "newImplementationLink": false,
20
+ "source": "react",
21
+ "tabName": null,
22
+ "slug": "/components/alert/react",
23
+ "sourceLink": "https://github.com/patternfly/patternfly-react/blob/main/packages/react-core/src/components/Alert/examples/Alert.md",
24
+ "relPath": "packages/react-core/src/components/Alert/examples/Alert.md",
25
+ "propComponents": [
26
+ {
27
+ "name": "Alert",
28
+ "description": "The main alert component.",
29
+ "props": [
30
+ {
31
+ "name": "actionClose",
32
+ "type": "React.ReactNode",
33
+ "description": "Close button; use the alert action close button component."
34
+ },
35
+ {
36
+ "name": "actionLinks",
37
+ "type": "React.ReactNode",
38
+ "description": "Action links; use a single alert action link component or multiple wrapped in an array\nor React fragment."
39
+ },
40
+ {
41
+ "name": "children",
42
+ "type": "React.ReactNode",
43
+ "description": "Content rendered inside the alert.",
44
+ "defaultValue": "''"
45
+ },
46
+ {
47
+ "name": "className",
48
+ "type": "string",
49
+ "description": "Additional classes to add to the alert.",
50
+ "defaultValue": "''"
51
+ },
52
+ {
53
+ "name": "component",
54
+ "type": "React.JSX.IntrinsicElements",
55
+ "description": "Sets the element to use as the alert title. Default is h4.",
56
+ "defaultValue": "'h4'"
57
+ },
58
+ {
59
+ "name": "customIcon",
60
+ "type": "React.ReactNode",
61
+ "description": "Set a custom icon to the alert. If not set the icon is set according to the variant."
62
+ },
63
+ {
64
+ "name": "id",
65
+ "type": "string",
66
+ "description": "Uniquely identifies the alert."
67
+ },
68
+ {
69
+ "name": "isExpandable",
70
+ "type": "boolean",
71
+ "description": "Flag indicating that the alert is expandable.",
72
+ "defaultValue": "false"
73
+ },
74
+ {
75
+ "name": "isInline",
76
+ "type": "boolean",
77
+ "description": "Flag to indicate if the alert is inline.",
78
+ "defaultValue": "false"
79
+ },
80
+ {
81
+ "name": "isLiveRegion",
82
+ "type": "boolean",
83
+ "description": "Flag to indicate if the alert is in a live region.",
84
+ "defaultValue": "false"
85
+ },
86
+ {
87
+ "name": "isPlain",
88
+ "type": "boolean",
89
+ "description": "Flag to indicate if the alert is plain.",
90
+ "defaultValue": "false"
91
+ },
92
+ {
93
+ "name": "onMouseEnter",
94
+ "type": "No type info",
95
+ "defaultValue": "() => {}"
96
+ },
97
+ {
98
+ "name": "onMouseLeave",
99
+ "type": "No type info",
100
+ "defaultValue": "() => {}"
101
+ },
102
+ {
103
+ "name": "onTimeout",
104
+ "type": "() => void",
105
+ "description": "Function to be executed on alert timeout. Relevant when the timeout prop is set.",
106
+ "defaultValue": "() => {}"
107
+ },
108
+ {
109
+ "name": "ouiaId",
110
+ "type": "number | string",
111
+ "description": "Value to overwrite the randomly generated data-ouia-component-id."
112
+ },
113
+ {
114
+ "name": "ouiaSafe",
115
+ "type": "boolean",
116
+ "description": "Set the value of data-ouia-safe. Only set to true when the component is in a static state, i.e. no animations are occurring. At all other times, this value must be false.",
117
+ "defaultValue": "true"
118
+ },
119
+ {
120
+ "name": "timeout",
121
+ "type": "number | boolean",
122
+ "description": "If set to true, the timeout is 8000 milliseconds. If a number is provided, alert will\nbe dismissed after that amount of time in milliseconds.",
123
+ "defaultValue": "false"
124
+ },
125
+ {
126
+ "name": "timeoutAnimation",
127
+ "type": "number",
128
+ "description": "If the user hovers over the alert and `timeout` expires, this is how long to wait\nbefore finally dismissing the alert.",
129
+ "defaultValue": "3000"
130
+ },
131
+ {
132
+ "name": "title",
133
+ "type": "React.ReactNode",
134
+ "description": "Title of the alert.",
135
+ "required": true
136
+ },
137
+ {
138
+ "name": "toggleAriaLabel",
139
+ "type": "string",
140
+ "description": "Adds accessible text to the alert toggle."
141
+ },
142
+ {
143
+ "name": "tooltipPosition",
144
+ "type": "| TooltipPosition\n| 'auto'\n| 'top'\n| 'bottom'\n| 'left'\n| 'right'\n| 'top-start'\n| 'top-end'\n| 'bottom-start'\n| 'bottom-end'\n| 'left-start'\n| 'left-end'\n| 'right-start'\n| 'right-end'",
145
+ "description": "Position of the tooltip which is displayed if text is truncated."
146
+ },
147
+ {
148
+ "name": "truncateTitle",
149
+ "type": "number",
150
+ "description": "Truncate title to number of lines.",
151
+ "defaultValue": "0"
152
+ },
153
+ {
154
+ "name": "variant",
155
+ "type": "'success' | 'danger' | 'warning' | 'info' | 'custom'",
156
+ "description": "Adds alert variant styles.",
157
+ "defaultValue": "AlertVariant.custom"
158
+ },
159
+ {
160
+ "name": "variantLabel",
161
+ "type": "string",
162
+ "description": "Variant label text for screen readers."
163
+ }
164
+ ]
165
+ },
166
+ {
167
+ "name": "AlertGroup",
168
+ "description": "",
169
+ "props": [
170
+ {
171
+ "name": "appendTo",
172
+ "type": "HTMLElement | (() => HTMLElement)",
173
+ "description": "Determine where the alert is appended to"
174
+ },
175
+ {
176
+ "name": "aria-label",
177
+ "type": "string",
178
+ "description": "Adds an accessible label to the alert group."
179
+ },
180
+ {
181
+ "name": "children",
182
+ "type": "React.ReactNode",
183
+ "description": "Alerts to be rendered in the AlertGroup"
184
+ },
185
+ {
186
+ "name": "className",
187
+ "type": "string",
188
+ "description": "Additional classes added to the AlertGroup"
189
+ },
190
+ {
191
+ "name": "hasAnimations",
192
+ "type": "boolean",
193
+ "description": "Flag to indicate whether Alerts are animated upon rendering and being dismissed. This is intended\nto remain false for testing purposes only.",
194
+ "beta": true
195
+ },
196
+ {
197
+ "name": "isLiveRegion",
198
+ "type": "boolean",
199
+ "description": "Turns the container into a live region so that changes to content within the AlertGroup, such as appending an Alert, are reliably announced to assistive technology."
200
+ },
201
+ {
202
+ "name": "isToast",
203
+ "type": "boolean",
204
+ "description": "Toast notifications are positioned at the top right corner of the viewport"
205
+ },
206
+ {
207
+ "name": "onOverflowClick",
208
+ "type": "() => void",
209
+ "description": "Function to call if user clicks on overflow message"
210
+ },
211
+ {
212
+ "name": "overflowMessage",
213
+ "type": "string",
214
+ "description": "Custom text to show for the overflow message"
215
+ }
216
+ ]
217
+ },
218
+ {
219
+ "name": "AlertActionCloseButton",
220
+ "description": "Renders a close button for a dismissable alert when this sub-component is passed into\nthe alert's actionClose property.",
221
+ "props": [
222
+ {
223
+ "name": "aria-label",
224
+ "type": "string",
225
+ "description": "Adds accessible text to the button.",
226
+ "defaultValue": "''"
227
+ },
228
+ {
229
+ "name": "children",
230
+ "type": "React.ReactNode",
231
+ "description": "Content rendered inside the button"
232
+ },
233
+ {
234
+ "name": "className",
235
+ "type": "string",
236
+ "description": "Additional classes added to the button"
237
+ },
238
+ {
239
+ "name": "component",
240
+ "type": "React.ElementType<any> | React.ComponentType<any>",
241
+ "description": "Sets the base component to render. defaults to button"
242
+ },
243
+ {
244
+ "name": "countOptions",
245
+ "type": "BadgeCountObject",
246
+ "description": "Adds count number to button"
247
+ },
248
+ {
249
+ "name": "hamburgerVariant",
250
+ "type": "'expand' | 'collapse'",
251
+ "description": "Adjusts and animates the hamburger icon to indicate what will happen upon clicking the button."
252
+ },
253
+ {
254
+ "name": "hasNoPadding",
255
+ "type": "boolean",
256
+ "description": "Applies no padding on a plain button variant. Use when plain button is placed inline with text"
257
+ },
258
+ {
259
+ "name": "icon",
260
+ "type": "React.ReactNode | null",
261
+ "description": "Icon for the button."
262
+ },
263
+ {
264
+ "name": "iconPosition",
265
+ "type": "'start' | 'end' | 'left' | 'right'",
266
+ "description": "Sets position of the icon. Note: \"left\" and \"right\" are deprecated. Use \"start\" and \"end\" instead"
267
+ },
268
+ {
269
+ "name": "inoperableEvents",
270
+ "type": "string[]",
271
+ "description": "Events to prevent when the button is in an aria-disabled state"
272
+ },
273
+ {
274
+ "name": "isAriaDisabled",
275
+ "type": "boolean",
276
+ "description": "Adds disabled styling and communicates that the button is disabled using the aria-disabled html attribute"
277
+ },
278
+ {
279
+ "name": "isBlock",
280
+ "type": "boolean",
281
+ "description": "Adds block styling to button"
282
+ },
283
+ {
284
+ "name": "isCircle",
285
+ "type": "boolean",
286
+ "description": "Flag indicating the button is a circle button. Intended for buttons that only contain an icon..",
287
+ "beta": true
288
+ },
289
+ {
290
+ "name": "isClicked",
291
+ "type": "boolean",
292
+ "description": "Adds clicked styling to button."
293
+ },
294
+ {
295
+ "name": "isDanger",
296
+ "type": "boolean",
297
+ "description": "Adds danger styling to secondary or link button variants"
298
+ },
299
+ {
300
+ "name": "isDisabled",
301
+ "type": "boolean",
302
+ "description": "Adds disabled styling and disables the button using the disabled html attribute"
303
+ },
304
+ {
305
+ "name": "isDocked",
306
+ "type": "boolean",
307
+ "description": "Flag indicating the button is a docked variant button. For use in docked navigation.",
308
+ "beta": true
309
+ },
310
+ {
311
+ "name": "isExpanded",
312
+ "type": "boolean",
313
+ "description": "Flag indicating whether content the button controls is expanded or not. Required when isHamburger is true."
314
+ },
315
+ {
316
+ "name": "isFavorite",
317
+ "type": "boolean",
318
+ "description": "Adds favorite styling to a button"
319
+ },
320
+ {
321
+ "name": "isFavorited",
322
+ "type": "boolean",
323
+ "description": "Flag indicating whether the button is favorited or not, only when isFavorite is true."
324
+ },
325
+ {
326
+ "name": "isHamburger",
327
+ "type": "boolean",
328
+ "description": "Flag indicating the button is a hamburger button. This will override the icon property."
329
+ },
330
+ {
331
+ "name": "isInline",
332
+ "type": "boolean",
333
+ "description": "Adds inline styling to a link button"
334
+ },
335
+ {
336
+ "name": "isLoading",
337
+ "type": "boolean",
338
+ "description": "Adds progress styling to button"
339
+ },
340
+ {
341
+ "name": "isSettings",
342
+ "type": "boolean",
343
+ "description": "Flag indicating the button is a settings button. This will override the icon property."
344
+ },
345
+ {
346
+ "name": "isTextExpanded",
347
+ "type": "boolean",
348
+ "description": "Flag indicating the docked button should display text. Only applies when isDocked is true.",
349
+ "beta": true
350
+ },
351
+ {
352
+ "name": "onClose",
353
+ "type": "() => void",
354
+ "description": "A callback for when the close button is clicked.",
355
+ "defaultValue": "() => undefined as any"
356
+ },
357
+ {
358
+ "name": "ouiaId",
359
+ "type": "number | string",
360
+ "description": "Value to overwrite the randomly generated data-ouia-component-id."
361
+ },
362
+ {
363
+ "name": "ouiaSafe",
364
+ "type": "boolean",
365
+ "description": "Set the value of data-ouia-safe. Only set to true when the component is in a static state, i.e. no animations are occurring. At all other times, this value must be false."
366
+ },
367
+ {
368
+ "name": "size",
369
+ "type": "'default' | 'sm' | 'lg'",
370
+ "description": "Adds styling which affects the size of the button"
371
+ },
372
+ {
373
+ "name": "spinnerAriaLabel",
374
+ "type": "string",
375
+ "description": "Accessible label for the spinner to describe what is loading"
376
+ },
377
+ {
378
+ "name": "spinnerAriaLabelledBy",
379
+ "type": "string",
380
+ "description": "Id of element which describes what is being loaded"
381
+ },
382
+ {
383
+ "name": "spinnerAriaValueText",
384
+ "type": "string",
385
+ "description": "Text describing that current loading status or progress"
386
+ },
387
+ {
388
+ "name": "state",
389
+ "type": "'read' | 'unread' | 'attention'",
390
+ "description": "Sets state of the stateful button variant. Default is \"unread\""
391
+ },
392
+ {
393
+ "name": "tabIndex",
394
+ "type": "number",
395
+ "description": "Sets the button tabindex."
396
+ },
397
+ {
398
+ "name": "type",
399
+ "type": "'button' | 'submit' | 'reset'",
400
+ "description": "Sets button type"
401
+ },
402
+ {
403
+ "name": "variant",
404
+ "type": "'primary' | 'secondary' | 'tertiary' | 'danger' | 'warning' | 'link' | 'plain' | 'control' | 'stateful'",
405
+ "description": "Adds button variant styles"
406
+ },
407
+ {
408
+ "name": "variantLabel",
409
+ "type": "string",
410
+ "description": "Variant Label for the close button."
411
+ }
412
+ ]
413
+ },
414
+ {
415
+ "name": "AlertActionLink",
416
+ "description": "Renders buttons styled as links beneath the alert title and description when this sub-component\nis passed into the alert's actionLinks property.",
417
+ "props": [
418
+ {
419
+ "name": "aria-label",
420
+ "type": "string",
421
+ "description": "Adds accessible text to the button."
422
+ },
423
+ {
424
+ "name": "children",
425
+ "type": "React.ReactNode",
426
+ "description": "Content rendered inside the button"
427
+ },
428
+ {
429
+ "name": "className",
430
+ "type": "string",
431
+ "description": "Additional classes added to the button",
432
+ "defaultValue": "''"
433
+ },
434
+ {
435
+ "name": "component",
436
+ "type": "React.ElementType<any> | React.ComponentType<any>",
437
+ "description": "Sets the base component to render. defaults to button"
438
+ },
439
+ {
440
+ "name": "countOptions",
441
+ "type": "BadgeCountObject",
442
+ "description": "Adds count number to button"
443
+ },
444
+ {
445
+ "name": "hamburgerVariant",
446
+ "type": "'expand' | 'collapse'",
447
+ "description": "Adjusts and animates the hamburger icon to indicate what will happen upon clicking the button."
448
+ },
449
+ {
450
+ "name": "hasNoPadding",
451
+ "type": "boolean",
452
+ "description": "Applies no padding on a plain button variant. Use when plain button is placed inline with text"
453
+ },
454
+ {
455
+ "name": "icon",
456
+ "type": "React.ReactNode | null",
457
+ "description": "Icon for the button."
458
+ },
459
+ {
460
+ "name": "iconPosition",
461
+ "type": "'start' | 'end' | 'left' | 'right'",
462
+ "description": "Sets position of the icon. Note: \"left\" and \"right\" are deprecated. Use \"start\" and \"end\" instead"
463
+ },
464
+ {
465
+ "name": "inoperableEvents",
466
+ "type": "string[]",
467
+ "description": "Events to prevent when the button is in an aria-disabled state"
468
+ },
469
+ {
470
+ "name": "isAriaDisabled",
471
+ "type": "boolean",
472
+ "description": "Adds disabled styling and communicates that the button is disabled using the aria-disabled html attribute"
473
+ },
474
+ {
475
+ "name": "isBlock",
476
+ "type": "boolean",
477
+ "description": "Adds block styling to button"
478
+ },
479
+ {
480
+ "name": "isCircle",
481
+ "type": "boolean",
482
+ "description": "Flag indicating the button is a circle button. Intended for buttons that only contain an icon..",
483
+ "beta": true
484
+ },
485
+ {
486
+ "name": "isClicked",
487
+ "type": "boolean",
488
+ "description": "Adds clicked styling to button."
489
+ },
490
+ {
491
+ "name": "isDanger",
492
+ "type": "boolean",
493
+ "description": "Adds danger styling to secondary or link button variants"
494
+ },
495
+ {
496
+ "name": "isDisabled",
497
+ "type": "boolean",
498
+ "description": "Adds disabled styling and disables the button using the disabled html attribute"
499
+ },
500
+ {
501
+ "name": "isDocked",
502
+ "type": "boolean",
503
+ "description": "Flag indicating the button is a docked variant button. For use in docked navigation.",
504
+ "beta": true
505
+ },
506
+ {
507
+ "name": "isExpanded",
508
+ "type": "boolean",
509
+ "description": "Flag indicating whether content the button controls is expanded or not. Required when isHamburger is true."
510
+ },
511
+ {
512
+ "name": "isFavorite",
513
+ "type": "boolean",
514
+ "description": "Adds favorite styling to a button"
515
+ },
516
+ {
517
+ "name": "isFavorited",
518
+ "type": "boolean",
519
+ "description": "Flag indicating whether the button is favorited or not, only when isFavorite is true."
520
+ },
521
+ {
522
+ "name": "isHamburger",
523
+ "type": "boolean",
524
+ "description": "Flag indicating the button is a hamburger button. This will override the icon property."
525
+ },
526
+ {
527
+ "name": "isInline",
528
+ "type": "boolean",
529
+ "description": "Adds inline styling to a link button"
530
+ },
531
+ {
532
+ "name": "isLoading",
533
+ "type": "boolean",
534
+ "description": "Adds progress styling to button"
535
+ },
536
+ {
537
+ "name": "isSettings",
538
+ "type": "boolean",
539
+ "description": "Flag indicating the button is a settings button. This will override the icon property."
540
+ },
541
+ {
542
+ "name": "isTextExpanded",
543
+ "type": "boolean",
544
+ "description": "Flag indicating the docked button should display text. Only applies when isDocked is true.",
545
+ "beta": true
546
+ },
547
+ {
548
+ "name": "ouiaId",
549
+ "type": "number | string",
550
+ "description": "Value to overwrite the randomly generated data-ouia-component-id."
551
+ },
552
+ {
553
+ "name": "ouiaSafe",
554
+ "type": "boolean",
555
+ "description": "Set the value of data-ouia-safe. Only set to true when the component is in a static state, i.e. no animations are occurring. At all other times, this value must be false."
556
+ },
557
+ {
558
+ "name": "size",
559
+ "type": "'default' | 'sm' | 'lg'",
560
+ "description": "Adds styling which affects the size of the button"
561
+ },
562
+ {
563
+ "name": "spinnerAriaLabel",
564
+ "type": "string",
565
+ "description": "Accessible label for the spinner to describe what is loading"
566
+ },
567
+ {
568
+ "name": "spinnerAriaLabelledBy",
569
+ "type": "string",
570
+ "description": "Id of element which describes what is being loaded"
571
+ },
572
+ {
573
+ "name": "spinnerAriaValueText",
574
+ "type": "string",
575
+ "description": "Text describing that current loading status or progress"
576
+ },
577
+ {
578
+ "name": "state",
579
+ "type": "'read' | 'unread' | 'attention'",
580
+ "description": "Sets state of the stateful button variant. Default is \"unread\""
581
+ },
582
+ {
583
+ "name": "tabIndex",
584
+ "type": "number",
585
+ "description": "Sets the button tabindex."
586
+ },
587
+ {
588
+ "name": "type",
589
+ "type": "'button' | 'submit' | 'reset'",
590
+ "description": "Sets button type"
591
+ },
592
+ {
593
+ "name": "variant",
594
+ "type": "'primary' | 'secondary' | 'tertiary' | 'danger' | 'warning' | 'link' | 'plain' | 'control' | 'stateful'",
595
+ "description": "Adds button variant styles"
596
+ }
597
+ ]
598
+ }
599
+ ],
600
+ "cssPrefix": [
601
+ "pf-v6-c-alert",
602
+ "pf-v6-c-alert-group"
603
+ ],
604
+ "examples": [
605
+ "Alert variants",
606
+ "Alert variations",
607
+ "Alert timeout",
608
+ "Expandable alerts",
609
+ "Truncated alerts",
610
+ "Custom icons",
611
+ "Inline alerts variants",
612
+ "Inline alert variations",
613
+ "Plain inline alert variants",
614
+ "Plain inline alert variations",
615
+ "Static live region alerts",
616
+ "Dynamic live region alerts",
617
+ "Asynchronous live region alerts",
618
+ "Static inline alert group",
619
+ "Toast alert group",
620
+ "Toast alert group with overflow capture",
621
+ "Asynchronous alert groups",
622
+ "Dynamic alert groups",
623
+ "Dynamic alert group with overflow message",
624
+ "Multiple dynamic alert groups"
625
+ ]
626
+ };
627
+ pageData.liveContext = {
628
+ Fragment,
629
+ useEffect,
630
+ useState,
631
+ RhUiUsersFillIcon,
632
+ RhUiContainerFillIcon,
633
+ DatabaseIcon,
634
+ RhUiServerStackFillIcon,
635
+ LaptopIcon,
636
+ buttonStyles
637
+ };
638
+ pageData.relativeImports = "import 'react-core/src/components/Alert/examples/./alert.css';"
639
+ pageData.examples = {
640
+ 'Alert variants': props =>
641
+ <Example {...pageData} {...props} {...{"code":"import { Fragment } from 'react';\nimport { Alert } from '@patternfly/react-core';\n\nexport const AlertVariants: React.FunctionComponent = () => (\n <Fragment>\n <Alert title=\"Custom alert title\" ouiaId=\"CustomAlert\" />\n <Alert variant=\"info\" title=\"Info alert title\" ouiaId=\"InfoAlert\" />\n <Alert variant=\"success\" title=\"Success alert title\" ouiaId=\"SuccessAlert\" />\n <Alert variant=\"warning\" title=\"Warning alert title\" ouiaId=\"WarningAlert\" />\n <Alert variant=\"danger\" title=\"Danger alert title\" ouiaId=\"DangerAlert\" />\n </Fragment>\n);\n","title":"Alert variants","lang":"ts","className":""}}>
642
+
643
+ <p {...{"className":"pf-v6-c-content--p pf-m-editorial ws-p "}}>
644
+ {`PatternFly supports several alert variants for different scenarios. Each variant has an associated status icon, background, and alert title coded to communicate the severity of an alert. Use the `}
645
+
646
+ <code {...{"className":"ws-code "}}>
647
+ {`variant`}
648
+ </code>
649
+ {` property to apply the following styling options. If no `}
650
+
651
+ <code {...{"className":"ws-code "}}>
652
+ {`variant`}
653
+ </code>
654
+ {` is specified, then the variant will be set to "custom".`}
655
+ </p>
656
+
657
+ <table {...{"className":"ws-table pf-v6-c-table pf-m-grid-lg pf-m-compact","role":"grid"}}>
658
+
659
+
660
+
661
+ <thead {...{"className":"pf-v6-c-table__thead"}}>
662
+
663
+
664
+
665
+ <tr {...{"role":"row","className":"pf-v6-c-table__tr"}}>
666
+
667
+
668
+
669
+ <th {...{"className":"undefined pf-v6-c-table__th pf-m-wrap","role":"columnheader","scope":"col"}}>
670
+
671
+ <div {...{"className":""}}>
672
+ {`Variant`}
673
+ </div>
674
+ </th>
675
+
676
+
677
+
678
+ <th {...{"className":"undefined pf-v6-c-table__th pf-m-wrap","role":"columnheader","scope":"col"}}>
679
+
680
+ <div {...{"className":""}}>
681
+ {`Description`}
682
+ </div>
683
+ </th>
684
+
685
+
686
+ </tr>
687
+
688
+
689
+ </thead>
690
+
691
+
692
+
693
+ <tbody {...{"role":"rowgroup","className":"pf-v6-c-table__tbody"}}>
694
+
695
+
696
+
697
+ <tr {...{"role":"row","className":"pf-v6-c-table__tr"}}>
698
+
699
+
700
+
701
+ <td {...{"role":"cell","className":"pf-v6-c-table__td","data-label":"Variant"}}>
702
+
703
+ <div {...{"className":""}}>
704
+ {`Custom`}
705
+ </div>
706
+ </td>
707
+
708
+
709
+
710
+ <td {...{"role":"cell","className":"pf-v6-c-table__td","data-label":"Description"}}>
711
+
712
+ <div {...{"className":""}}>
713
+ {`Use for generic messages that should have a custom color set by the associated CSS variable. Should be used when the message has no associated severity.`}
714
+ </div>
715
+ </td>
716
+
717
+
718
+ </tr>
719
+
720
+
721
+
722
+ <tr {...{"role":"row","className":"pf-v6-c-table__tr"}}>
723
+
724
+
725
+
726
+ <td {...{"role":"cell","className":"pf-v6-c-table__td","data-label":"Variant"}}>
727
+
728
+ <div {...{"className":""}}>
729
+ {`Info`}
730
+ </div>
731
+ </td>
732
+
733
+
734
+
735
+ <td {...{"role":"cell","className":"pf-v6-c-table__td","data-label":"Description"}}>
736
+
737
+ <div {...{"className":""}}>
738
+ {`Use for general informational messages`}
739
+ </div>
740
+ </td>
741
+
742
+
743
+ </tr>
744
+
745
+
746
+
747
+ <tr {...{"role":"row","className":"pf-v6-c-table__tr"}}>
748
+
749
+
750
+
751
+ <td {...{"role":"cell","className":"pf-v6-c-table__td","data-label":"Variant"}}>
752
+
753
+ <div {...{"className":""}}>
754
+ {`Success`}
755
+ </div>
756
+ </td>
757
+
758
+
759
+
760
+ <td {...{"role":"cell","className":"pf-v6-c-table__td","data-label":"Description"}}>
761
+
762
+ <div {...{"className":""}}>
763
+ {`Use to indicate that a task or process has been completed successfully`}
764
+ </div>
765
+ </td>
766
+
767
+
768
+ </tr>
769
+
770
+
771
+
772
+ <tr {...{"role":"row","className":"pf-v6-c-table__tr"}}>
773
+
774
+
775
+
776
+ <td {...{"role":"cell","className":"pf-v6-c-table__td","data-label":"Variant"}}>
777
+
778
+ <div {...{"className":""}}>
779
+ {`Warning`}
780
+ </div>
781
+ </td>
782
+
783
+
784
+
785
+ <td {...{"role":"cell","className":"pf-v6-c-table__td","data-label":"Description"}}>
786
+
787
+ <div {...{"className":""}}>
788
+ {`Use to indicate that a non-critical error has occurred`}
789
+ </div>
790
+ </td>
791
+
792
+
793
+ </tr>
794
+
795
+
796
+
797
+ <tr {...{"role":"row","className":"pf-v6-c-table__tr"}}>
798
+
799
+
800
+
801
+ <td {...{"role":"cell","className":"pf-v6-c-table__td","data-label":"Variant"}}>
802
+
803
+ <div {...{"className":""}}>
804
+ {`Danger`}
805
+ </div>
806
+ </td>
807
+
808
+
809
+
810
+ <td {...{"role":"cell","className":"pf-v6-c-table__td","data-label":"Description"}}>
811
+
812
+ <div {...{"className":""}}>
813
+ {`Use to indicate that a critical or blocking error has occurred`}
814
+ </div>
815
+ </td>
816
+
817
+
818
+ </tr>
819
+
820
+
821
+ </tbody>
822
+
823
+
824
+ </table>
825
+ </Example>,
826
+ 'Alert variations': props =>
827
+ <Example {...pageData} {...props} {...{"code":"import { Fragment } from 'react';\nimport { Alert, AlertActionCloseButton, AlertActionLink } from '@patternfly/react-core';\n\nexport const AlertVariations: React.FunctionComponent = () => (\n <Fragment>\n <Alert\n variant=\"success\"\n title=\"Success alert title\"\n actionLinks={\n <Fragment>\n <AlertActionLink component=\"a\" href=\"#\">\n View details\n </AlertActionLink>\n <AlertActionLink // eslint-disable-next-line no-console\n onClick={() => console.log('Clicked on Ignore')}\n >\n Ignore\n </AlertActionLink>\n </Fragment>\n }\n >\n <p>Success alert description. This should tell the user more information about the alert.</p>\n </Alert>\n <Alert variant=\"success\" title=\"Success alert title\">\n <p>\n Success alert description. This should tell the user more information about the alert.{' '}\n <a href=\"#\">This is a link.</a>\n </p>\n </Alert>\n <Alert\n variant=\"success\"\n title=\"Success alert title\"\n // eslint-disable-next-line no-console\n actionClose={<AlertActionCloseButton onClose={() => console.log('Clicked the close button')} />}\n >\n <p>Short alert description.</p>\n </Alert>\n <Alert variant=\"success\" title=\"div success alert title\" component=\"div\" />\n <Alert variant=\"success\" title=\"h6 Success alert title\" component=\"h6\">\n <p>Short alert description.</p>\n </Alert>\n </Fragment>\n);\n","title":"Alert variations","lang":"ts","className":""}}>
828
+
829
+ <p {...{"className":"pf-v6-c-content--p pf-m-editorial ws-p "}}>
830
+ {`PatternFly supports several properties and variations that can be used to add extra content to an alert.`}
831
+ </p>
832
+
833
+ <ul {...{"className":"pf-v6-c-content--ul pf-m-editorial ws-ul "}}>
834
+
835
+
836
+
837
+ <li {...{"className":"pf-v6-c-content--li pf-m-editorial ws-li "}}>
838
+
839
+
840
+
841
+ <p {...{"className":"pf-v6-c-content--p pf-m-editorial ws-p "}}>
842
+ {`As demonstrated in the 1st variation below, use the `}
843
+
844
+ <code {...{"className":"ws-code "}}>
845
+ {`actionLinks`}
846
+ </code>
847
+ {` property to add one or more `}
848
+
849
+ <code {...{"className":"ws-code "}}>
850
+ {`<AlertActionLink>`}
851
+ </code>
852
+ {` components that place links beneath the alert message. You must pass in `}
853
+
854
+ <code {...{"className":"ws-code "}}>
855
+ {`href`}
856
+ </code>
857
+ {` and `}
858
+
859
+ <code {...{"className":"ws-code "}}>
860
+ {`component="a"`}
861
+ </code>
862
+ {` properties to have an `}
863
+
864
+ <code {...{"className":"ws-code "}}>
865
+ {`<AlertActionLink>`}
866
+ </code>
867
+ {` act as a proper link, rather than as a button.`}
868
+ </p>
869
+
870
+
871
+ </li>
872
+
873
+
874
+
875
+ <li {...{"className":"pf-v6-c-content--li pf-m-editorial ws-li "}}>
876
+
877
+
878
+
879
+ <p {...{"className":"pf-v6-c-content--p pf-m-editorial ws-p "}}>
880
+ {`As demonstrated in the 2nd variation below, use a native HTML `}
881
+
882
+ <code {...{"className":"ws-code "}}>
883
+ {`<a>`}
884
+ </code>
885
+ {` element to add links within an alert message.`}
886
+ </p>
887
+
888
+
889
+ </li>
890
+
891
+
892
+
893
+ <li {...{"className":"pf-v6-c-content--li pf-m-editorial ws-li "}}>
894
+
895
+
896
+
897
+ <p {...{"className":"pf-v6-c-content--p pf-m-editorial ws-p "}}>
898
+ {`As demonstrated in the 3rd variation below, use the `}
899
+
900
+ <code {...{"className":"ws-code "}}>
901
+ {`actionClose`}
902
+ </code>
903
+ {` property to add an `}
904
+
905
+ <code {...{"className":"ws-code "}}>
906
+ {`<AlertActionCloseButton>`}
907
+ </code>
908
+ {` component, which can be used to manage and customize alert dismissals.`}
909
+ </p>
910
+
911
+
912
+ </li>
913
+
914
+
915
+
916
+ <li {...{"className":"pf-v6-c-content--li pf-m-editorial ws-li "}}>
917
+
918
+
919
+
920
+ <p {...{"className":"pf-v6-c-content--p pf-m-editorial ws-p "}}>
921
+ {`As demonstrated in the 4th and 5th variations below, use the `}
922
+
923
+ <code {...{"className":"ws-code "}}>
924
+ {`component`}
925
+ </code>
926
+ {` property to set the element for an alert title.`}
927
+ </p>
928
+
929
+
930
+
931
+ <ul {...{"className":"pf-v6-c-content--ul pf-m-editorial ws-ul "}}>
932
+
933
+
934
+
935
+ <li {...{"className":"pf-v6-c-content--li pf-m-editorial ws-li "}}>
936
+ {`If there is not a description passed via `}
937
+
938
+ <code {...{"className":"ws-code "}}>
939
+ {`children`}
940
+ </code>
941
+ {` prop, then the `}
942
+
943
+ <code {...{"className":"ws-code "}}>
944
+ {`component`}
945
+ </code>
946
+ {` prop should be set to a non-heading element such as a `}
947
+
948
+ <code {...{"className":"ws-code "}}>
949
+ {`span`}
950
+ </code>
951
+ {` or `}
952
+
953
+ <code {...{"className":"ws-code "}}>
954
+ {`div`}
955
+ </code>
956
+ {`.`}
957
+ </li>
958
+
959
+
960
+
961
+ <li {...{"className":"pf-v6-c-content--li pf-m-editorial ws-li "}}>
962
+ {`If there is a description passed via `}
963
+
964
+ <code {...{"className":"ws-code "}}>
965
+ {`children`}
966
+ </code>
967
+ {` prop, then the `}
968
+
969
+ <code {...{"className":"ws-code "}}>
970
+ {`component`}
971
+ </code>
972
+ {` prop should be a heading element. Headings should be ordered by their level and heading levels should not be skipped. For example, a heading of an `}
973
+
974
+ <code {...{"className":"ws-code "}}>
975
+ {`h2`}
976
+ </code>
977
+ {` level should not be followed directly by an `}
978
+
979
+ <code {...{"className":"ws-code "}}>
980
+ {`h4`}
981
+ </code>
982
+ {`.`}
983
+ </li>
984
+
985
+
986
+ </ul>
987
+
988
+
989
+ </li>
990
+
991
+
992
+ </ul>
993
+ </Example>,
994
+ 'Alert timeout': props =>
995
+ <Example {...pageData} {...props} {...{"code":"import { Fragment, useState } from 'react';\nimport { Alert, AlertActionLink, AlertGroup, Button } from '@patternfly/react-core';\n\nexport const AlertTimeout: React.FunctionComponent = () => {\n const [alerts, setAlerts] = useState<React.ReactNode[]>([]);\n const [newAlertKey, setNewAlertKey] = useState<number>(0);\n\n const onClick = () => {\n const timeout = 8000;\n setNewAlertKey((key) => key + 1);\n setAlerts((prevAlerts) => [\n <Alert\n title=\"Default timeout Alert\"\n timeout={timeout}\n actionLinks={\n <Fragment>\n <AlertActionLink component=\"a\" href=\"#\">\n View details\n </AlertActionLink>\n <AlertActionLink // eslint-disable-next-line no-console\n onClick={() => console.log('Clicked on Ignore')}\n >\n Ignore\n </AlertActionLink>\n </Fragment>\n }\n key={newAlertKey}\n >\n This alert will dismiss after {`${timeout / 1000} seconds`}\n </Alert>,\n ...prevAlerts\n ]);\n };\n\n return (\n <Fragment>\n <Button variant=\"secondary\" onClick={onClick}>\n Add alert\n </Button>\n <AlertGroup hasAnimations isLiveRegion>\n {alerts}\n </AlertGroup>\n </Fragment>\n );\n};\n","title":"Alert timeout","lang":"ts","className":""}}>
996
+
997
+ <p {...{"className":"pf-v6-c-content--p pf-m-editorial ws-p "}}>
998
+ {`Use the `}
999
+
1000
+ <code {...{"className":"ws-code "}}>
1001
+ {`timeout`}
1002
+ </code>
1003
+ {` property to automatically dismiss an alert after a period of time. If set to `}
1004
+
1005
+ <code {...{"className":"ws-code "}}>
1006
+ {`true`}
1007
+ </code>
1008
+ {`, the `}
1009
+
1010
+ <code {...{"className":"ws-code "}}>
1011
+ {`timeout`}
1012
+ </code>
1013
+ {` will be 8000 milliseconds. Provide a specific value to dismiss the alert after a different number of milliseconds.`}
1014
+ </p>
1015
+ </Example>,
1016
+ 'Expandable alerts': props =>
1017
+ <Example {...pageData} {...props} {...{"code":"import { Fragment } from 'react';\nimport { Alert, AlertActionCloseButton, AlertActionLink } from '@patternfly/react-core';\n\nexport const AlertExpandable: React.FunctionComponent = () => (\n <Fragment>\n <Alert\n isExpandable\n variant=\"success\"\n title=\"Success alert title\"\n // eslint-disable-next-line no-console\n actionClose={<AlertActionCloseButton onClose={() => console.log('Clicked the close button')} />}\n >\n <p>Success alert description. This should tell the user more information about the alert.</p>\n </Alert>\n <Alert\n isExpandable\n isInline\n variant=\"success\"\n title=\"Success alert title\"\n actionLinks={\n <Fragment>\n <AlertActionLink component=\"a\" href=\"#\">\n View details\n </AlertActionLink>\n <AlertActionLink // eslint-disable-next-line no-console\n onClick={() => console.log('Clicked on Ignore')}\n >\n Ignore\n </AlertActionLink>\n </Fragment>\n }\n >\n <p>Success alert description. This should tell the user more information about the alert.</p>\n </Alert>\n </Fragment>\n);\n","title":"Expandable alerts","lang":"ts","className":""}}>
1018
+
1019
+ <p {...{"className":"pf-v6-c-content--p pf-m-editorial ws-p "}}>
1020
+ {`An alert can contain additional, hidden information that is made visible when users click a caret icon. This information can be expanded and collapsed each time the icon is clicked.`}
1021
+ </p>
1022
+
1023
+ <p {...{"className":"pf-v6-c-content--p pf-m-editorial ws-p "}}>
1024
+ {`It is not recommended to use an expandable alert with a `}
1025
+
1026
+ <code {...{"className":"ws-code "}}>
1027
+ {`timeout`}
1028
+ </code>
1029
+ {` in a `}
1030
+
1031
+ <PatternflyThemeLink {...{"to":"/components/alert#toast-alert-group","className":""}}>
1032
+ {`toast alert group`}
1033
+ </PatternflyThemeLink>
1034
+ {` because the alert could timeout before users have time to interact with and view the entire alert.`}
1035
+ </p>
1036
+
1037
+ <p {...{"className":"pf-v6-c-content--p pf-m-editorial ws-p "}}>
1038
+ {`See the `}
1039
+
1040
+ <PatternflyThemeLink {...{"to":"/components/alert/accessibility#toast-alerts","className":""}}>
1041
+ {`toast alert considerations`}
1042
+ </PatternflyThemeLink>
1043
+ {` section of the alert accessibility documentation to understand the accessibility risks associated with using toast alerts.`}
1044
+ </p>
1045
+ </Example>,
1046
+ 'Truncated alerts': props =>
1047
+ <Example {...pageData} {...props} {...{"code":"import { Fragment } from 'react';\nimport { Alert } from '@patternfly/react-core';\n\nexport const AlertTruncated: React.FunctionComponent = () => (\n <Fragment>\n <Alert\n variant=\"info\"\n truncateTitle={1}\n title={`\n Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur pellentesque neque cursus enim fringilla tincidunt. Proin lobortis aliquam dictum. Nam vel ullamcorper nulla, nec blandit dolor. Vivamus pellentesque neque justo, nec accumsan nulla rhoncus id. Suspendisse mollis, tortor quis faucibus volutpat, sem leo fringilla turpis, ac lacinia augue metus in nulla. Cras vestibulum lacinia orci. Pellentesque sodales consequat interdum. Sed porttitor tincidunt metus nec iaculis. Pellentesque non commodo justo. Morbi feugiat rhoncus neque, vitae facilisis diam aliquam nec. Sed dapibus vitae quam at tristique. Nunc vel commodo mi. Mauris et rhoncus leo.\n `}\n />\n <Alert\n variant=\"warning\"\n truncateTitle={2}\n title={`\n Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur pellentesque neque cursus enim fringilla tincidunt. Proin lobortis aliquam dictum. Nam vel ullamcorper nulla, nec blandit dolor. Vivamus pellentesque neque justo, nec accumsan nulla rhoncus id. Suspendisse mollis, tortor quis faucibus volutpat, sem leo fringilla turpis, ac lacinia augue metus in nulla. Cras vestibulum lacinia orci. Pellentesque sodales consequat interdum. Sed porttitor tincidunt metus nec iaculis. Pellentesque non commodo justo. Morbi feugiat rhoncus neque, vitae facilisis diam aliquam nec. Sed dapibus vitae quam at tristique. Nunc vel commodo mi. Mauris et rhoncus leo.\n `}\n />\n <Alert\n variant=\"danger\"\n truncateTitle={3}\n title={`\n Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur pellentesque neque cursus enim fringilla tincidunt. Proin lobortis aliquam dictum. Nam vel ullamcorper nulla, nec blandit dolor. Vivamus pellentesque neque justo, nec accumsan nulla rhoncus id. Suspendisse mollis, tortor quis faucibus volutpat, sem leo fringilla turpis, ac lacinia augue metus in nulla. Cras vestibulum lacinia orci. Pellentesque sodales consequat interdum. Sed porttitor tincidunt metus nec iaculis. Pellentesque non commodo justo. Morbi feugiat rhoncus neque, vitae facilisis diam aliquam nec. Sed dapibus vitae quam at tristique. Nunc vel commodo mi. Mauris et rhoncus leo.\n `}\n />\n </Fragment>\n);\n","title":"Truncated alerts","lang":"ts","className":""}}>
1048
+
1049
+ <p {...{"className":"pf-v6-c-content--p pf-m-editorial ws-p "}}>
1050
+ {`Use the `}
1051
+
1052
+ <code {...{"className":"ws-code "}}>
1053
+ {`truncateTitle`}
1054
+ </code>
1055
+ {` property to shorten a long `}
1056
+
1057
+ <code {...{"className":"ws-code "}}>
1058
+ {`title`}
1059
+ </code>
1060
+ {`. Set `}
1061
+
1062
+ <code {...{"className":"ws-code "}}>
1063
+ {`truncateTitle`}
1064
+ </code>
1065
+ {` equal to a number (passed in as `}
1066
+
1067
+ <code {...{"className":"ws-code "}}>
1068
+ {`{n}`}
1069
+ </code>
1070
+ {`) to reduce the number of lines of text in the alert's `}
1071
+
1072
+ <code {...{"className":"ws-code "}}>
1073
+ {`title`}
1074
+ </code>
1075
+ {`. Users may hover over or tab to a truncated `}
1076
+
1077
+ <code {...{"className":"ws-code "}}>
1078
+ {`title`}
1079
+ </code>
1080
+ {` to see the full message in a tooltip.`}
1081
+ </p>
1082
+ </Example>,
1083
+ 'Custom icons': props =>
1084
+ <Example {...pageData} {...props} {...{"code":"import { Fragment } from 'react';\nimport { Alert } from '@patternfly/react-core';\nimport RhUiUsersFillIcon from '@patternfly/react-icons/dist/esm/icons/rh-ui-users-fill-icon';\nimport RhUiContainerFillIcon from '@patternfly/react-icons/dist/esm/icons/rh-ui-container-fill-icon';\nimport DatabaseIcon from '@patternfly/react-icons/dist/esm/icons/database-icon';\nimport RhUiServerStackFillIcon from '@patternfly/react-icons/dist/esm/icons/rh-ui-server-stack-fill-icon';\nimport LaptopIcon from '@patternfly/react-icons/dist/esm/icons/laptop-icon';\n\nexport const AlertCustomIcons: React.FunctionComponent = () => (\n <Fragment>\n <Alert customIcon={<RhUiUsersFillIcon />} title=\"Default alert title\" />\n <Alert customIcon={<RhUiContainerFillIcon />} variant=\"info\" title=\"Info alert title\" />\n <Alert customIcon={<DatabaseIcon />} variant=\"success\" title=\"Success alert title\" />\n <Alert customIcon={<RhUiServerStackFillIcon />} variant=\"warning\" title=\"Warning alert title\" />\n <Alert customIcon={<LaptopIcon />} variant=\"danger\" title=\"Danger alert title\" />\n </Fragment>\n);\n","title":"Custom icons","lang":"ts","className":""}}>
1085
+
1086
+ <p {...{"className":"pf-v6-c-content--p pf-m-editorial ws-p "}}>
1087
+ {`Use the `}
1088
+
1089
+ <code {...{"className":"ws-code "}}>
1090
+ {`customIcon`}
1091
+ </code>
1092
+ {` property to replace a default alert icon with a custom icon.`}
1093
+ </p>
1094
+ </Example>,
1095
+ 'Inline alerts variants': props =>
1096
+ <Example {...pageData} {...props} {...{"code":"import { Fragment } from 'react';\nimport { Alert } from '@patternfly/react-core';\n\nexport const AlertInlineVariants: React.FunctionComponent = () => (\n <Fragment>\n <Alert variant=\"custom\" isInline title=\"Custom inline alert title\" />\n <Alert variant=\"info\" isInline title=\"Info inline alert title\" />\n <Alert variant=\"success\" isInline title=\"Success inline alert title\" />\n <Alert variant=\"warning\" isInline title=\"Warning inline alert title\" />\n <Alert variant=\"danger\" isInline title=\"Danger inline alert title\" />\n </Fragment>\n);\n","title":"Inline alerts variants","lang":"ts","className":""}}>
1097
+
1098
+ <p {...{"className":"pf-v6-c-content--p pf-m-editorial ws-p "}}>
1099
+ {`Use inline alerts to display an alert inline with content. All alert variants may use the `}
1100
+
1101
+ <code {...{"className":"ws-code "}}>
1102
+ {`isInline`}
1103
+ </code>
1104
+ {` property to position alerts in content-heavy areas, such as within forms, wizards, or drawers.`}
1105
+ </p>
1106
+ </Example>,
1107
+ 'Inline alert variations': props =>
1108
+ <Example {...pageData} {...props} {...{"code":"import { Fragment } from 'react';\nimport { Alert, AlertActionCloseButton, AlertActionLink } from '@patternfly/react-core';\n\nexport const AlertInlineVariations: React.FunctionComponent = () => (\n <Fragment>\n <Alert\n isInline\n variant=\"success\"\n title=\"Success alert title\"\n actionLinks={\n <Fragment>\n <AlertActionLink component=\"a\" href=\"#\">\n View details\n </AlertActionLink>\n <AlertActionLink // eslint-disable-next-line no-console\n onClick={() => console.log('Clicked on Ignore')}\n >\n Ignore\n </AlertActionLink>\n </Fragment>\n }\n >\n <p>Success alert description. This should tell the user more information about the alert.</p>\n </Alert>\n <Alert isInline variant=\"success\" title=\"Success alert title\">\n <p>\n Success alert description. This should tell the user more information about the alert.{' '}\n <a href=\"#\">This is a link.</a>\n </p>\n </Alert>\n <Alert\n isInline\n variant=\"success\"\n title=\"Success alert title\"\n // eslint-disable-next-line no-console\n actionClose={<AlertActionCloseButton onClose={() => console.log('Clicked the close button')} />}\n >\n <p>Short alert description.</p>\n </Alert>\n <Alert isInline variant=\"success\" title=\"div success alert title\" component=\"div\" />\n <Alert isInline variant=\"success\" title=\"h6 Success alert title\" component=\"h6\">\n <p>Short alert description.</p>\n </Alert>\n </Fragment>\n);\n","title":"Inline alert variations","lang":"ts","className":""}}>
1109
+
1110
+ <p {...{"className":"pf-v6-c-content--p pf-m-editorial ws-p "}}>
1111
+ {`All general alert variations can use the `}
1112
+
1113
+ <code {...{"className":"ws-code "}}>
1114
+ {`isInline`}
1115
+ </code>
1116
+ {` property to apply inline styling.`}
1117
+ </p>
1118
+ </Example>,
1119
+ 'Plain inline alert variants': props =>
1120
+ <Example {...pageData} {...props} {...{"code":"import { Fragment } from 'react';\nimport { Alert } from '@patternfly/react-core';\n\nexport const AlertPlainInlineVariants: React.FunctionComponent = () => (\n <Fragment>\n <Alert variant=\"custom\" isInline isPlain title=\"Custom inline alert title\" />\n <Alert variant=\"info\" isInline isPlain title=\"Info inline alert title\" />\n <Alert variant=\"success\" isInline isPlain title=\"Success inline alert title\" />\n <Alert variant=\"warning\" isInline isPlain title=\"Warning inline alert title\" />\n <Alert variant=\"danger\" isInline isPlain title=\"Danger inline alert title\" />\n </Fragment>\n);\n","title":"Plain inline alert variants","lang":"ts","className":""}}>
1121
+
1122
+ <p {...{"className":"pf-v6-c-content--p pf-m-editorial ws-p "}}>
1123
+ {`Use the `}
1124
+
1125
+ <code {...{"className":"ws-code "}}>
1126
+ {`isPlain`}
1127
+ </code>
1128
+ {` property to make any inline alert plain. Plain styling removes the colored background but keeps colored text and icons.`}
1129
+ </p>
1130
+ </Example>,
1131
+ 'Plain inline alert variations': props =>
1132
+ <Example {...pageData} {...props} {...{"code":"import { Alert } from '@patternfly/react-core';\n\nexport const AlertPlainInlineVariations: React.FunctionComponent = () => (\n <Alert isInline isPlain variant=\"success\" title=\"Success alert title\">\n <p>Success alert description. This should tell the user more information about the alert.</p>\n </Alert>\n);\n","title":"Plain inline alert variations","lang":"ts","className":""}}>
1133
+
1134
+ <p {...{"className":"pf-v6-c-content--p pf-m-editorial ws-p "}}>
1135
+ {`It is not recommended to use a plain inline alert with `}
1136
+
1137
+ <code {...{"className":"ws-code "}}>
1138
+ {`actionClose`}
1139
+ </code>
1140
+ {` nor `}
1141
+
1142
+ <code {...{"className":"ws-code "}}>
1143
+ {`actionLinks`}
1144
+ </code>
1145
+ {` because these alerts are non-dismissible and should persist until the error or action related to the alert is resolved.`}
1146
+ </p>
1147
+ </Example>,
1148
+ 'Static live region alerts': props =>
1149
+ <Example {...pageData} {...props} {...{"code":"import { Fragment } from 'react';\nimport { Alert, AlertActionCloseButton } from '@patternfly/react-core';\n\nexport const AlertStaticLiveRegion: React.FunctionComponent = () => (\n <Fragment>\n <Alert\n isLiveRegion\n variant=\"info\"\n title=\"Default live region configuration\"\n // eslint-disable-next-line no-console\n actionClose={<AlertActionCloseButton onClose={() => console.log('Clicked the close button')} />}\n >\n This alert uses the recommended <code>isLiveRegion</code> prop to automatically set ARIA attributes and CSS\n classes.\n </Alert>\n <Alert\n aria-live=\"assertive\"\n aria-relevant=\"additions text\"\n aria-atomic=\"true\"\n variant=\"info\"\n title=\"Customized live region\"\n // eslint-disable-next-line no-console\n actionClose={<AlertActionCloseButton onClose={() => console.log('Clicked the close button')} />}\n >\n You can alternatively omit the <code>isLiveRegion</code> prop to specify ARIA attributes and CSS manually on the\n containing element.\n </Alert>\n </Fragment>\n);\n","title":"Static live region alerts","lang":"ts","className":""}}>
1150
+
1151
+ <p {...{"className":"pf-v6-c-content--p pf-m-editorial ws-p "}}>
1152
+ {`Live region alerts allow you to expose dynamic content changes in a way that can be announced by assistive technologies.`}
1153
+ </p>
1154
+
1155
+ <p {...{"className":"pf-v6-c-content--p pf-m-editorial ws-p "}}>
1156
+ {`By default, `}
1157
+
1158
+ <code {...{"className":"ws-code "}}>
1159
+ {`isLiveRegion`}
1160
+ </code>
1161
+ {`alerts are static.`}
1162
+ </p>
1163
+ </Example>,
1164
+ 'Dynamic live region alerts': props =>
1165
+ <Example {...pageData} {...props} {...{"code":"import { Fragment, useState } from 'react';\nimport { Alert, AlertGroup, AlertVariant, Flex, FlexItem } from '@patternfly/react-core';\nimport buttonStyles from '@patternfly/react-styles/css/components/Button/button';\n\ninterface AlertInfo {\n title: string;\n variant: AlertVariant;\n key: number;\n}\n\nexport const DynamicLiveRegionAlert: React.FunctionComponent = () => {\n const [alerts, setAlerts] = useState<AlertInfo[]>([]);\n const getUniqueId: () => number = () => new Date().getTime();\n const btnClasses = [buttonStyles.button, buttonStyles.modifiers.secondary].join(' ');\n\n const addAlert = (alertInfo: AlertInfo) => {\n setAlerts((prevAlertInfo) => [alertInfo, ...prevAlertInfo]);\n };\n\n const addSuccessAlert = () => {\n addAlert({\n title: 'Single success alert',\n variant: AlertVariant.success,\n key: getUniqueId()\n });\n };\n const addInfoAlert = () => {\n addAlert({\n title: 'Single info alert',\n variant: AlertVariant.info,\n key: getUniqueId()\n });\n };\n const addDangerAlert = () => {\n addAlert({\n title: 'Single danger alert',\n variant: AlertVariant.danger,\n key: getUniqueId()\n });\n };\n\n return (\n <Fragment>\n <Flex gap={{ default: 'gapXs' }} style={{ marginBottom: '16px' }}>\n <FlexItem>\n <button onClick={addSuccessAlert} type=\"button\" className={btnClasses}>\n Add single success alert\n </button>\n </FlexItem>\n <FlexItem>\n <button onClick={addInfoAlert} type=\"button\" className={btnClasses}>\n Add single info alert\n </button>\n </FlexItem>\n <FlexItem>\n <button onClick={addDangerAlert} type=\"button\" className={btnClasses}>\n Add single danger alert\n </button>\n </FlexItem>\n </Flex>\n <AlertGroup hasAnimations isLiveRegion aria-live=\"polite\" aria-relevant=\"additions text\" aria-atomic=\"false\">\n {alerts.map(({ title, variant, key }) => (\n <Alert variant={variant} title={title} key={key} />\n ))}\n </AlertGroup>\n </Fragment>\n );\n};\n","title":"Dynamic live region alerts","lang":"ts","className":""}}>
1166
+
1167
+ <p {...{"className":"pf-v6-c-content--p pf-m-editorial ws-p "}}>
1168
+ {`Alerts that are asynchronously appended into dynamic `}
1169
+
1170
+ <PatternflyThemeLink {...{"to":"/components/alert/#alert-group-examples","className":""}}>
1171
+ {`alert groups`}
1172
+ </PatternflyThemeLink>
1173
+ {` via the `}
1174
+
1175
+ <code {...{"className":"ws-code "}}>
1176
+ {`isLiveRegion`}
1177
+ </code>
1178
+ {` property will be announced to assistive technology the moment the change happens, following the strategy used for `}
1179
+
1180
+ <code {...{"className":"ws-code "}}>
1181
+ {`aria-atomic`}
1182
+ </code>
1183
+ {`, which defaults to false. This means only changes of type "addition" will be announced.`}
1184
+ </p>
1185
+ </Example>,
1186
+ 'Asynchronous live region alerts': props =>
1187
+ <Example {...pageData} {...props} {...{"code":"import { Fragment, useEffect, useState } from 'react';\nimport { Alert, AlertGroup, AlertVariant, ToggleGroup, ToggleGroupItem } from '@patternfly/react-core';\n\ninterface AlertInfo {\n title: string;\n variant: AlertVariant;\n key: number;\n}\n\nexport const AsyncLiveRegionAlert: React.FunctionComponent = () => {\n const [alerts, setAlerts] = useState<AlertInfo[]>([]);\n const [isActive, setIsActive] = useState(false);\n const getUniqueId: () => number = () => new Date().getTime();\n\n const addAlert = (alertInfo: AlertInfo) => {\n setAlerts((prevAlertInfo) => [alertInfo, ...prevAlertInfo]);\n };\n\n useEffect(() => {\n let timer = null;\n if (isActive) {\n timer = setInterval(() => {\n addAlert({\n title: `Async alert number ${alerts.length + 1}`,\n variant: AlertVariant.info,\n key: getUniqueId()\n });\n }, 4500);\n } else {\n clearInterval(timer);\n }\n\n return () => {\n clearInterval(timer);\n };\n }, [isActive, alerts]);\n\n return (\n <Fragment>\n <ToggleGroup aria-label=\"Toggle asynchronous alerts\">\n <ToggleGroupItem\n text=\"Async alerts on\"\n buttonId=\"async-alerts-on\"\n isSelected={isActive}\n onChange={() => setIsActive(!isActive)}\n />\n </ToggleGroup>\n <AlertGroup hasAnimations isLiveRegion>\n {alerts.map(({ title, variant, key }) => (\n <Alert variant={variant} title={title} key={key} />\n ))}\n </AlertGroup>\n </Fragment>\n );\n};\n","title":"Asynchronous live region alerts","lang":"ts","className":""}}>
1188
+
1189
+ <p {...{"className":"pf-v6-c-content--p pf-m-editorial ws-p "}}>
1190
+ {`This example shows how an alert could be triggered by an asynchronous event in the application. Note that you can customize how the alert will be announced to assistive technology. See the `}
1191
+
1192
+ <PatternflyThemeLink {...{"to":"/components/alert/accessibility/","className":""}}>
1193
+ {`alert accessibility`}
1194
+ </PatternflyThemeLink>
1195
+ {` for more information.`}
1196
+ </p>
1197
+ </Example>,
1198
+ 'Static inline alert group': props =>
1199
+ <Example {...pageData} {...props} {...{"code":"import { Fragment } from 'react';\nimport { Alert, AlertGroup } from '@patternfly/react-core';\n\nexport const AlertGroupStatic: React.FunctionComponent = () => (\n <Fragment>\n <AlertGroup>\n <Alert title=\"Success alert\" variant=\"success\" isInline />\n <Alert title=\"Info alert\" variant=\"info\" isInline />\n </AlertGroup>\n </Fragment>\n);\n","title":"Static inline alert group","lang":"ts","className":""}}>
1200
+
1201
+ <p {...{"className":"pf-v6-c-content--p pf-m-editorial ws-p "}}>
1202
+ {`All alert group variants may combine multiple `}
1203
+
1204
+ <PatternflyThemeLink {...{"to":"/components/alert","className":""}}>
1205
+ {`alert variants`}
1206
+ </PatternflyThemeLink>
1207
+ {` For example, the following static inline alert group includes one "success" alert and one "info" alert.`}
1208
+ </p>
1209
+ </Example>,
1210
+ 'Toast alert group': props =>
1211
+ <Example {...pageData} {...props} {...{"code":"import { Fragment, useState } from 'react';\nimport {\n Alert,\n AlertProps,\n AlertGroup,\n AlertActionCloseButton,\n AlertVariant,\n Flex,\n FlexItem\n} from '@patternfly/react-core';\nimport buttonStyles from '@patternfly/react-styles/css/components/Button/button';\n\nexport const AlertGroupToast: React.FunctionComponent = () => {\n const [alerts, setAlerts] = useState<Partial<AlertProps>[]>([]);\n\n const addAlert = (title: string, variant: AlertProps['variant'], key: React.Key) => {\n setAlerts((prevAlerts) => [{ title, variant, key }, ...prevAlerts]);\n };\n\n const removeAlert = (key: React.Key) => {\n setAlerts((prevAlerts) => [...prevAlerts.filter((alert) => alert.key !== key)]);\n };\n\n const btnClasses = [buttonStyles.button, buttonStyles.modifiers.secondary].join(' ');\n\n const getUniqueId = () => new Date().getTime();\n\n const addSuccessAlert = () => {\n addAlert('Toast success alert', 'success', getUniqueId());\n };\n\n const addDangerAlert = () => {\n addAlert('Toast danger alert', 'danger', getUniqueId());\n };\n\n const addInfoAlert = () => {\n addAlert('Toast info alert', 'info', getUniqueId());\n };\n\n return (\n <Fragment>\n <Flex gap={{ default: 'gapXs' }}>\n <FlexItem>\n <button onClick={addSuccessAlert} type=\"button\" className={btnClasses}>\n Add toast success alert\n </button>\n </FlexItem>\n <FlexItem>\n <button onClick={addDangerAlert} type=\"button\" className={btnClasses}>\n Add toast danger alert\n </button>\n </FlexItem>\n <FlexItem>\n <button onClick={addInfoAlert} type=\"button\" className={btnClasses}>\n Add toast info alert\n </button>\n </FlexItem>\n </Flex>\n <AlertGroup hasAnimations isToast isLiveRegion>\n {alerts.map(({ key, variant, title }) => (\n <Alert\n variant={AlertVariant[variant]}\n title={title}\n actionClose={\n <AlertActionCloseButton\n title={title as string}\n variantLabel={`${variant} alert`}\n onClose={() => removeAlert(key)}\n />\n }\n key={key}\n />\n ))}\n </AlertGroup>\n </Fragment>\n );\n};\n","title":"Toast alert group","lang":"ts","className":""}}>
1212
+
1213
+ <p {...{"className":"pf-v6-c-content--p pf-m-editorial ws-p "}}>
1214
+ {`Toast alert groups are created by passing in the `}
1215
+
1216
+ <code {...{"className":"ws-code "}}>
1217
+ {`isToast`}
1218
+ </code>
1219
+ {` and `}
1220
+
1221
+ <code {...{"className":"ws-code "}}>
1222
+ {`isLiveRegion`}
1223
+ </code>
1224
+ {` properties.`}
1225
+ </p>
1226
+
1227
+ <p {...{"className":"pf-v6-c-content--p pf-m-editorial ws-p "}}>
1228
+ {`Click the buttons in the example below to add alerts to a toast group.`}
1229
+ </p>
1230
+ </Example>,
1231
+ 'Toast alert group with overflow capture': props =>
1232
+ <Example {...pageData} {...props} {...{"code":"import { Fragment, useState } from 'react';\nimport {\n Alert,\n AlertProps,\n AlertGroup,\n AlertActionCloseButton,\n AlertVariant,\n Flex,\n FlexItem\n} from '@patternfly/react-core';\nimport buttonStyles from '@patternfly/react-styles/css/components/Button/button';\n\nexport const AlertGroupToastOverflowCapture: React.FunctionComponent = () => {\n const [alerts, setAlerts] = useState<Partial<AlertProps>[]>([]);\n const [overflowMessage, setOverflowMessage] = useState<string>('');\n\n const maxDisplayed = 4;\n\n const getOverflowMessage = (alertsNumber: number) => {\n const overflow = alertsNumber - maxDisplayed;\n if (overflow > 0) {\n return `View ${overflow} more alerts`;\n }\n return '';\n };\n\n const addAlert = (title: string, variant: AlertProps['variant'], key: React.Key) => {\n setAlerts((prevAlerts) => [{ title, variant, key }, ...prevAlerts]);\n setOverflowMessage(getOverflowMessage(alerts.length + 1));\n };\n\n const removeAlert = (key: React.Key) => {\n const newAlerts = alerts.filter((alert) => alert.key !== key);\n setAlerts(newAlerts);\n setOverflowMessage(getOverflowMessage(newAlerts.length));\n };\n\n const btnClasses = [buttonStyles.button, buttonStyles.modifiers.secondary].join(' ');\n\n const getUniqueId = () => new Date().getTime();\n\n const addSuccessAlert = () => {\n addAlert('Toast success alert', 'success', getUniqueId());\n };\n\n const addDangerAlert = () => {\n addAlert('Toast danger alert', 'danger', getUniqueId());\n };\n\n const addInfoAlert = () => {\n addAlert('Toast info alert', 'info', getUniqueId());\n };\n\n const onOverflowClick = () => {\n // eslint-disable-next-line no-console\n console.log('Overflow message clicked');\n };\n\n return (\n <Fragment>\n <Flex gap={{ default: 'gapXs' }} style={{ marginBottom: '16px' }}>\n <FlexItem>\n <button onClick={addSuccessAlert} type=\"button\" className={btnClasses}>\n Add toast success alert\n </button>\n </FlexItem>\n <FlexItem>\n <button onClick={addDangerAlert} type=\"button\" className={btnClasses}>\n Add toast danger alert\n </button>\n </FlexItem>\n <FlexItem>\n <button onClick={addInfoAlert} type=\"button\" className={btnClasses}>\n Add toast info alert\n </button>\n </FlexItem>\n </Flex>\n <AlertGroup\n hasAnimations\n isToast\n isLiveRegion\n onOverflowClick={onOverflowClick}\n overflowMessage={overflowMessage}\n >\n {alerts.slice(0, maxDisplayed).map(({ key, variant, title }) => (\n <Alert\n variant={AlertVariant[variant]}\n title={title}\n actionClose={\n <AlertActionCloseButton\n title={title as string}\n variantLabel={`${variant} alert`}\n onClose={() => removeAlert(key)}\n />\n }\n key={key}\n />\n ))}\n </AlertGroup>\n </Fragment>\n );\n};\n","title":"Toast alert group with overflow capture","lang":"ts","className":""}}>
1233
+
1234
+ <p {...{"className":"pf-v6-c-content--p pf-m-editorial ws-p "}}>
1235
+ {`Users will see an overflow message once a predefined number of alerts are displayed. They will not see any alerts beyond the display limit, which must be explicitly set.`}
1236
+ </p>
1237
+
1238
+ <p {...{"className":"pf-v6-c-content--p pf-m-editorial ws-p "}}>
1239
+ {`In the following example, an overflow message will appear when more than 4 alerts would be shown. When a 5th alert would appear, an overflow message is shown instead.`}
1240
+ </p>
1241
+
1242
+ <p {...{"className":"pf-v6-c-content--p pf-m-editorial ws-p "}}>
1243
+ {`When an overflow message appears in an `}
1244
+
1245
+ <code {...{"className":"ws-code "}}>
1246
+ {`AlertGroup`}
1247
+ </code>
1248
+ {` using the `}
1249
+
1250
+ <code {...{"className":"ws-code "}}>
1251
+ {`isLiveRegion`}
1252
+ </code>
1253
+ {` property, the "view 1 more alert" text label will be announced, but the alert message will not.`}
1254
+ </p>
1255
+
1256
+ <p {...{"className":"pf-v6-c-content--p pf-m-editorial ws-p "}}>
1257
+ {`Users navigating via keyboard or another assistive technology will need a way to navigate to and reveal hidden alerts before they disappear. Alternatively, there should be a place where notifications or alerts are collected to be viewed or read later.`}
1258
+ </p>
1259
+ </Example>,
1260
+ 'Asynchronous alert groups': props =>
1261
+ <Example {...pageData} {...props} {...{"code":"import { Fragment, useState } from 'react';\nimport {\n Alert,\n AlertProps,\n AlertGroup,\n AlertActionCloseButton,\n AlertVariant,\n InputGroup,\n InputGroupItem,\n useInterval\n} from '@patternfly/react-core';\nimport buttonStyles from '@patternfly/react-styles/css/components/Button/button';\n\nexport const AlertGroupAsync: React.FunctionComponent = () => {\n const [alerts, setAlerts] = useState<Partial<AlertProps>[]>([]);\n const [isRunning, setIsRunning] = useState(false);\n\n const btnClasses = [buttonStyles.button, buttonStyles.modifiers.secondary].join(' ');\n\n const getUniqueId = () => new Date().getTime();\n\n const addAlert = () => {\n setAlerts((prevAlerts) => [\n {\n title: `Async notification ${prevAlerts.length + 1} was added to the queue.`,\n variant: 'danger',\n key: getUniqueId()\n },\n ...prevAlerts\n ]);\n };\n\n const removeAlert = (key: React.Key) => {\n setAlerts((prevAlerts) => [...prevAlerts.filter((alert) => alert.key !== key)]);\n };\n\n const startAsyncAlerts = () => {\n setIsRunning(true);\n };\n\n const stopAsyncAlerts = () => {\n setIsRunning(false);\n };\n\n useInterval(addAlert, isRunning ? 4500 : null);\n\n return (\n <Fragment>\n <InputGroup style={{ marginBottom: '16px' }}>\n <InputGroupItem>\n <button onClick={startAsyncAlerts} type=\"button\" className={btnClasses}>\n Start async alerts\n </button>\n </InputGroupItem>\n <InputGroupItem>\n <button onClick={stopAsyncAlerts} type=\"button\" className={btnClasses}>\n Stop async alerts\n </button>\n </InputGroupItem>\n </InputGroup>\n <AlertGroup hasAnimations isToast isLiveRegion aria-live=\"assertive\">\n {alerts.map(({ title, variant, key }) => (\n <Alert\n variant={AlertVariant[variant]}\n title={title}\n key={key}\n actionClose={\n <AlertActionCloseButton\n title={title as string}\n variantLabel={`${variant} alert`}\n onClose={() => removeAlert(key)}\n />\n }\n />\n ))}\n </AlertGroup>\n </Fragment>\n );\n};\n","title":"Asynchronous alert groups","lang":"ts","className":""}}>
1262
+
1263
+ <p {...{"className":"pf-v6-c-content--p pf-m-editorial ws-p "}}>
1264
+ {`The following example shows how alerts can be triggered by an asynchronous event in the application. You can customize how an alert will be announced to assistive technology by adjusting the value of the `}
1265
+
1266
+ <code {...{"className":"ws-code "}}>
1267
+ {`aria-live`}
1268
+ </code>
1269
+ {` property. Click the "start async" alert button below and then click the buttons in the above toast examples to demonstrate how asynchronous events add alerts to a group. Click the "stop async alerts" button to halt this behavior.`}
1270
+ </p>
1271
+
1272
+ <p {...{"className":"pf-v6-c-content--p pf-m-editorial ws-p "}}>
1273
+ {`See the `}
1274
+
1275
+ <PatternflyThemeLink {...{"to":"/components/alert/accessibility","className":""}}>
1276
+ {`alert accessibility tab`}
1277
+ </PatternflyThemeLink>
1278
+ {` for more information on customizing this behavior.`}
1279
+ </p>
1280
+ </Example>,
1281
+ 'Dynamic alert groups': props =>
1282
+ <Example {...pageData} {...props} {...{"code":"import { Fragment, useState } from 'react';\nimport {\n Alert,\n AlertProps,\n AlertGroup,\n AlertActionCloseButton,\n AlertVariant,\n Flex,\n FlexItem\n} from '@patternfly/react-core';\nimport buttonStyles from '@patternfly/react-styles/css/components/Button/button';\n\nexport const AlertGroupSingularDynamic: React.FunctionComponent = () => {\n const [alerts, setAlerts] = useState<Partial<AlertProps>[]>([]);\n\n const addAlert = (title: string, variant: AlertProps['variant'], key: React.Key) => {\n setAlerts((prevAlerts) => [{ title, variant, key }, ...prevAlerts]);\n };\n\n const removeAlert = (key: React.Key) => {\n setAlerts((prevAlerts) => [...prevAlerts.filter((alert) => alert.key !== key)]);\n };\n\n const btnClasses = [buttonStyles.button, buttonStyles.modifiers.secondary].join(' ');\n\n const getUniqueId = () => new Date().getTime();\n\n const addSuccessAlert = () => {\n addAlert('Success alert', 'success', getUniqueId());\n };\n\n const addDangerAlert = () => {\n addAlert('Danger alert', 'danger', getUniqueId());\n };\n\n const addInfoAlert = () => {\n addAlert('Info alert', 'info', getUniqueId());\n };\n\n return (\n <Fragment>\n <Flex gap={{ default: 'gapXs' }} style={{ marginBottom: '16px' }}>\n <FlexItem>\n <button onClick={addSuccessAlert} type=\"button\" className={btnClasses}>\n Add single success alert\n </button>\n </FlexItem>\n <FlexItem>\n <button onClick={addDangerAlert} type=\"button\" className={btnClasses}>\n Add single danger alert\n </button>\n </FlexItem>\n <FlexItem>\n <button onClick={addInfoAlert} type=\"button\" className={btnClasses}>\n Add single info alert\n </button>\n </FlexItem>\n </Flex>\n <AlertGroup hasAnimations isLiveRegion>\n {alerts.map(({ title, variant, key }) => (\n <Alert\n isInline\n variant={AlertVariant[variant]}\n title={title}\n key={key}\n actionClose={\n <AlertActionCloseButton\n title={title as string}\n variantLabel={`${variant} alert`}\n onClose={() => removeAlert(key)}\n />\n }\n />\n ))}\n </AlertGroup>\n </Fragment>\n );\n};\n","title":"Dynamic alert groups","lang":"ts","className":""}}>
1283
+
1284
+ <p {...{"className":"pf-v6-c-content--p pf-m-editorial ws-p "}}>
1285
+ {`Click the buttons in the example below to add dynamic alerts to a group.`}
1286
+ </p>
1287
+ </Example>,
1288
+ 'Dynamic alert group with overflow message': props =>
1289
+ <Example {...pageData} {...props} {...{"code":"import { Fragment, useState } from 'react';\nimport {\n Alert,\n AlertProps,\n AlertGroup,\n AlertActionCloseButton,\n AlertVariant,\n Flex,\n FlexItem\n} from '@patternfly/react-core';\nimport buttonStyles from '@patternfly/react-styles/css/components/Button/button';\n\nexport const AlertGroupSingularDynamicOverflow: React.FunctionComponent = () => {\n const [alerts, setAlerts] = useState<Partial<AlertProps>[]>([]);\n const [overflowMessage, setOverflowMessage] = useState<string>('');\n\n const maxDisplayed = 4;\n\n const getOverflowMessage = (alertsNumber: number) => {\n const overflow = alertsNumber - maxDisplayed;\n if (overflow > 0) {\n return `View ${overflow} more alerts`;\n }\n return '';\n };\n\n const addAlert = (title: string, variant: AlertProps['variant'], key: React.Key) => {\n setAlerts((prevAlerts) => [{ title, variant, key }, ...prevAlerts]);\n setOverflowMessage(getOverflowMessage(alerts.length + 1));\n };\n\n const removeAlert = (key: React.Key) => {\n const newAlerts = alerts.filter((alert) => alert.key !== key);\n setAlerts(newAlerts);\n setOverflowMessage(getOverflowMessage(newAlerts.length));\n };\n\n const btnClasses = [buttonStyles.button, buttonStyles.modifiers.secondary].join(' ');\n\n const getUniqueId = () => new Date().getTime();\n\n const addSuccessAlert = () => {\n addAlert('Success alert', 'success', getUniqueId());\n };\n\n const addDangerAlert = () => {\n addAlert('Danger alert', 'danger', getUniqueId());\n };\n\n const addInfoAlert = () => {\n addAlert('Info alert', 'info', getUniqueId());\n };\n\n const onOverflowClick = () => {\n // eslint-disable-next-line no-console\n console.log('Overflow message clicked');\n };\n\n return (\n <Fragment>\n <Flex gap={{ default: 'gapXs' }} style={{ marginBottom: '16px' }}>\n <FlexItem>\n <button onClick={addSuccessAlert} type=\"button\" className={btnClasses}>\n Add single success alert\n </button>\n </FlexItem>\n <FlexItem>\n <button onClick={addDangerAlert} type=\"button\" className={btnClasses}>\n Add single danger alert\n </button>\n </FlexItem>\n <FlexItem>\n <button onClick={addInfoAlert} type=\"button\" className={btnClasses}>\n Add single info alert\n </button>\n </FlexItem>\n </Flex>\n <AlertGroup hasAnimations isLiveRegion onOverflowClick={onOverflowClick} overflowMessage={overflowMessage}>\n {alerts.slice(0, maxDisplayed).map(({ key, variant, title }) => (\n <Alert\n isInline\n variant={AlertVariant[variant]}\n title={title}\n actionClose={\n <AlertActionCloseButton\n title={title as string}\n variantLabel={`${variant} alert`}\n onClose={() => removeAlert(key)}\n />\n }\n key={key}\n />\n ))}\n </AlertGroup>\n </Fragment>\n );\n};\n","title":"Dynamic alert group with overflow message","lang":"ts","className":""}}>
1290
+
1291
+ <p {...{"className":"pf-v6-c-content--p pf-m-editorial ws-p "}}>
1292
+ {`In the following example, there can be a maximum of 4 alerts shown at once.`}
1293
+ </p>
1294
+ </Example>,
1295
+ 'Multiple dynamic alert groups': props =>
1296
+ <Example {...pageData} {...props} {...{"code":"import { Fragment, useState } from 'react';\nimport {\n Alert,\n AlertProps,\n AlertGroup,\n AlertActionCloseButton,\n AlertVariant,\n Flex,\n FlexItem\n} from '@patternfly/react-core';\nimport buttonStyles from '@patternfly/react-styles/css/components/Button/button';\n\nexport const AlertGroupMultipleDynamic: React.FunctionComponent = () => {\n const [alerts, setAlerts] = useState<Partial<AlertProps>[]>([]);\n\n const addAlerts = (incomingAlerts: Partial<AlertProps>[]) => {\n setAlerts((prevAlerts) => [...incomingAlerts, ...prevAlerts]);\n };\n\n const removeAlert = (key: React.Key) => {\n setAlerts((prevAlerts) => [...prevAlerts.filter((alert) => alert.key !== key)]);\n };\n\n const btnClasses = [buttonStyles.button, buttonStyles.modifiers.secondary].join(' ');\n\n const getUniqueId = () => String.fromCharCode(65 + Math.floor(Math.random() * 26)) + Date.now();\n\n const addAlertCollection = () => {\n addAlerts([\n { title: 'First alert notification.', variant: 'success', key: getUniqueId() },\n { title: 'Second alert notification.', variant: 'warning', key: getUniqueId() },\n { title: 'Third alert notification.', variant: 'danger', key: getUniqueId() }\n ]);\n };\n\n return (\n <Fragment>\n <Flex gap={{ default: 'gapXs' }}>\n <FlexItem>\n <button onClick={addAlertCollection} type=\"button\" className={btnClasses}>\n Add alert collection\n </button>\n </FlexItem>\n </Flex>\n <AlertGroup hasAnimations isToast isLiveRegion>\n {alerts.map(({ title, variant, key }) => (\n <Alert\n variant={AlertVariant[variant]}\n title={title}\n key={key}\n actionClose={\n <AlertActionCloseButton\n title={title as string}\n variantLabel={`${variant} alert`}\n onClose={() => removeAlert(key)}\n />\n }\n />\n ))}\n </AlertGroup>\n </Fragment>\n );\n};\n","title":"Multiple dynamic alert groups","lang":"ts","className":""}}>
1297
+
1298
+ <p {...{"className":"pf-v6-c-content--p pf-m-editorial ws-p "}}>
1299
+ {`You may add multiple alerts to an alert group at once. Click the "add alert collection" button in the example below to add a batch of 3 toast alerts to a group.`}
1300
+ </p>
1301
+ </Example>
1302
+ };
1303
+
1304
+ const Component = () => (
1305
+ <React.Fragment>
1306
+ <p {...{"className":"pf-v6-c-content--p pf-m-editorial ws-p "}}>
1307
+ {`Micro animations have been added for `}
1308
+ <code {...{"className":"ws-code "}}>
1309
+ {`<Alert>`}
1310
+ </code>
1311
+ {` components within an `}
1312
+ <code {...{"className":"ws-code "}}>
1313
+ {`<AlertGroup>`}
1314
+ </code>
1315
+ {`. By default, you must opt into animations, since they can require updates to tests. To enable or disable animations as needed, use the `}
1316
+ <code {...{"className":"ws-code "}}>
1317
+ {`hasAnimations`}
1318
+ </code>
1319
+ {` property. With animations enabled, we recommend you ensure that dynamically-added alerts are prepended to a list of alerts, rather than appended to the end of it.`}
1320
+ </p>
1321
+ <p {...{"className":"pf-v6-c-content--p pf-m-editorial ws-p "}}>
1322
+ {`Micro animations are turned on for all examples and demos where alerts are dynamically added.`}
1323
+ </p>
1324
+ <AutoLinkHeader {...{"id":"alert-examples","headingLevel":"h2","className":"ws-title ws-h2"}}>
1325
+ {`Alert examples`}
1326
+ </AutoLinkHeader>
1327
+ {React.createElement(pageData.examples["Alert variants"])}
1328
+ {React.createElement(pageData.examples["Alert variations"])}
1329
+ {React.createElement(pageData.examples["Alert timeout"])}
1330
+ {React.createElement(pageData.examples["Expandable alerts"])}
1331
+ {React.createElement(pageData.examples["Truncated alerts"])}
1332
+ {React.createElement(pageData.examples["Custom icons"])}
1333
+ {React.createElement(pageData.examples["Inline alerts variants"])}
1334
+ {React.createElement(pageData.examples["Inline alert variations"])}
1335
+ {React.createElement(pageData.examples["Plain inline alert variants"])}
1336
+ {React.createElement(pageData.examples["Plain inline alert variations"])}
1337
+ {React.createElement(pageData.examples["Static live region alerts"])}
1338
+ {React.createElement(pageData.examples["Dynamic live region alerts"])}
1339
+ {React.createElement(pageData.examples["Asynchronous live region alerts"])}
1340
+ <AutoLinkHeader {...{"id":"alert-group-examples","headingLevel":"h2","className":"ws-title ws-h2"}}>
1341
+ {`Alert group examples`}
1342
+ </AutoLinkHeader>
1343
+ <p {...{"className":"pf-v6-c-content--p pf-m-editorial ws-p "}}>
1344
+ {`An alert group stacks and positions 2 or more alerts in a live region, either in a layer over the main content of a page or inline with the page content. Alert groups should always rank alerts by age, stacking new alerts on top of old ones as they surface.`}
1345
+ </p>
1346
+ <AutoLinkHeader {...{"id":"alert-group-variants","headingLevel":"h3","className":"ws-title ws-h3"}}>
1347
+ {`Alert group variants`}
1348
+ </AutoLinkHeader>
1349
+ <p {...{"className":"pf-v6-c-content--p pf-m-editorial ws-p "}}>
1350
+ {`Alert groups can be one of the following variants:`}
1351
+ </p>
1352
+ <table {...{"className":"ws-table pf-v6-c-table pf-m-grid-lg pf-m-compact","role":"grid"}}>
1353
+ <thead {...{"className":"pf-v6-c-table__thead"}}>
1354
+ <tr {...{"role":"row","className":"pf-v6-c-table__tr"}}>
1355
+ <th {...{"className":"undefined pf-v6-c-table__th pf-m-wrap","role":"columnheader","scope":"col"}}>
1356
+ <div {...{"className":""}}>
1357
+ {`Variant`}
1358
+ </div>
1359
+ </th>
1360
+ <th {...{"className":"undefined pf-v6-c-table__th pf-m-wrap","role":"columnheader","scope":"col"}}>
1361
+ <div {...{"className":""}}>
1362
+ {`Description`}
1363
+ </div>
1364
+ </th>
1365
+ </tr>
1366
+ </thead>
1367
+ <tbody {...{"role":"rowgroup","className":"pf-v6-c-table__tbody"}}>
1368
+ <tr {...{"role":"row","className":"pf-v6-c-table__tr"}}>
1369
+ <td {...{"role":"cell","className":"pf-v6-c-table__td","data-label":"Variant"}}>
1370
+ <div {...{"className":""}}>
1371
+ {`Static inline`}
1372
+ </div>
1373
+ </td>
1374
+ <td {...{"role":"cell","className":"pf-v6-c-table__td","data-label":"Description"}}>
1375
+ <div {...{"className":""}}>
1376
+ {`Static inline alert groups contain alerts that appear when the page loads, and are seen within the normal page content flow. These groups should not contain alerts that will dynamically appear or update.`}
1377
+ </div>
1378
+ </td>
1379
+ </tr>
1380
+ <tr {...{"role":"row","className":"pf-v6-c-table__tr"}}>
1381
+ <td {...{"role":"cell","className":"pf-v6-c-table__td","data-label":"Variant"}}>
1382
+ <div {...{"className":""}}>
1383
+ {`Toast`}
1384
+ </div>
1385
+ </td>
1386
+ <td {...{"role":"cell","className":"pf-v6-c-table__td","data-label":"Description"}}>
1387
+ <div {...{"className":""}}>
1388
+ {`Toast alert groups contain alerts that typically appear in response to an asynchronous event or user action. These groups are positioned on top of other content at the top right of the page.`}
1389
+ </div>
1390
+ </td>
1391
+ </tr>
1392
+ <tr {...{"role":"row","className":"pf-v6-c-table__tr"}}>
1393
+ <td {...{"role":"cell","className":"pf-v6-c-table__td","data-label":"Variant"}}>
1394
+ <div {...{"className":""}}>
1395
+ {`Dynamic`}
1396
+ </div>
1397
+ </td>
1398
+ <td {...{"role":"cell","className":"pf-v6-c-table__td","data-label":"Description"}}>
1399
+ <div {...{"className":""}}>
1400
+ {`Dynamic alert groups contain alerts that typically appear in response to a user action, and are seen within the normal page content flow.`}
1401
+ </div>
1402
+ </td>
1403
+ </tr>
1404
+ </tbody>
1405
+ </table>
1406
+ <p {...{"className":"pf-v6-c-content--p pf-m-editorial ws-p "}}>
1407
+ {`Dynamic alerts that are generated after the page initially loads must be appended to either a toast or dynamic `}
1408
+ <code {...{"className":"ws-code "}}>
1409
+ {`AlertGroup`}
1410
+ </code>
1411
+ {`, both of which must use the `}
1412
+ <code {...{"className":"ws-code "}}>
1413
+ {`isLiveRegion`}
1414
+ </code>
1415
+ {` property. New alerts appended to a toast or dynamic group will be announced by assistive technologies the moment the change happens. For information about customizing this announcement, read the `}
1416
+ <PatternflyThemeLink {...{"to":"/components/alert/accessibility#aria-atomic-and-aria-relevant","className":""}}>
1417
+ {`aria-atomic and aria-relevant`}
1418
+ </PatternflyThemeLink>
1419
+ {` section of the alert accessibility documentation.`}
1420
+ </p>
1421
+ {React.createElement(pageData.examples["Static inline alert group"])}
1422
+ {React.createElement(pageData.examples["Toast alert group"])}
1423
+ {React.createElement(pageData.examples["Toast alert group with overflow capture"])}
1424
+ {React.createElement(pageData.examples["Asynchronous alert groups"])}
1425
+ {React.createElement(pageData.examples["Dynamic alert groups"])}
1426
+ {React.createElement(pageData.examples["Dynamic alert group with overflow message"])}
1427
+ {React.createElement(pageData.examples["Multiple dynamic alert groups"])}
1428
+ </React.Fragment>
1429
+ );
1430
+ Component.displayName = 'ComponentsAlertReactDocs';
1431
+ Component.pageData = pageData;
1432
+
1433
+ export default Component;