| 1 |
--- |
| 2 |
id: Action list |
| 3 |
section: components |
| 4 |
cssPrefix: pf-v6-c-action-list |
| 5 |
---## Examples |
| 6 |
|
| 7 |
### Action list single group |
| 8 |
|
| 9 |
```html |
| 10 |
<div class="pf-v6-c-action-list"> |
| 11 |
<div class="pf-v6-c-action-list__group"> |
| 12 |
<div class="pf-v6-c-action-list__item"> |
| 13 |
<button class="pf-v6-c-button pf-m-primary" type="button"> |
| 14 |
<span class="pf-v6-c-button__text">Next</span> |
| 15 |
</button> |
| 16 |
</div> |
| 17 |
<div class="pf-v6-c-action-list__item"> |
| 18 |
<button class="pf-v6-c-button pf-m-secondary" type="button"> |
| 19 |
<span class="pf-v6-c-button__text">Back</span> |
| 20 |
</button> |
| 21 |
</div> |
| 22 |
</div> |
| 23 |
</div> |
| 24 |
<br />With kebab |
| 25 |
<div class="pf-v6-c-action-list"> |
| 26 |
<div class="pf-v6-c-action-list__group"> |
| 27 |
<div class="pf-v6-c-action-list__item"> |
| 28 |
<button class="pf-v6-c-button pf-m-primary" type="button"> |
| 29 |
<span class="pf-v6-c-button__text">Next</span> |
| 30 |
</button> |
| 31 |
</div> |
| 32 |
<div class="pf-v6-c-action-list__item"> |
| 33 |
<button class="pf-v6-c-button pf-m-secondary" type="button"> |
| 34 |
<span class="pf-v6-c-button__text">Back</span> |
| 35 |
</button> |
| 36 |
</div> |
| 37 |
<div class="pf-v6-c-action-list__item"> |
| 38 |
<button |
| 39 |
class="pf-v6-c-button pf-m-plain" |
| 40 |
type="button" |
| 41 |
aria-label="Toggle" |
| 42 |
> |
| 43 |
<span class="pf-v6-c-button__icon"> |
| 44 |
<svg |
| 45 |
class="pf-v6-svg" |
| 46 |
fill="currentColor" |
| 47 |
viewBox="0 0 32 32" |
| 48 |
aria-hidden="true" |
| 49 |
role="img" |
| 50 |
width="1em" |
| 51 |
height="1em" |
| 52 |
> |
| 53 |
<path |
| 54 |
d="M12.25 5c0-2.068 1.683-3.75 3.75-3.75S19.75 2.932 19.75 5 18.067 8.75 16 8.75 12.25 7.068 12.25 5ZM16 12.25c-2.067 0-3.75 1.682-3.75 3.75s1.683 3.75 3.75 3.75 3.75-1.682 3.75-3.75-1.683-3.75-3.75-3.75Zm0 11c-2.067 0-3.75 1.682-3.75 3.75s1.683 3.75 3.75 3.75 3.75-1.682 3.75-3.75-1.683-3.75-3.75-3.75Z" |
| 55 |
/> |
| 56 |
</svg> |
| 57 |
</span> |
| 58 |
</button> |
| 59 |
</div> |
| 60 |
</div> |
| 61 |
</div> |
| 62 |
|
| 63 |
``` |
| 64 |
|
| 65 |
### Action list with icons |
| 66 |
|
| 67 |
```html |
| 68 |
<div class="pf-v6-c-action-list pf-m-icons"> |
| 69 |
<div class="pf-v6-c-action-list__item"> |
| 70 |
<button class="pf-v6-c-button pf-m-plain" type="button" aria-label="Close"> |
| 71 |
<span class="pf-v6-c-button__icon"> |
| 72 |
<svg |
| 73 |
class="pf-v6-svg" |
| 74 |
fill="currentColor" |
| 75 |
viewBox="0 0 20 20" |
| 76 |
aria-hidden="true" |
| 77 |
role="img" |
| 78 |
width="1em" |
| 79 |
height="1em" |
| 80 |
> |
| 81 |
<path |
| 82 |
d="M17.8 16.2 11.59 10l6.21-6.21c.42-.46.39-1.17-.07-1.59-.43-.4-1.09-.4-1.52 0l-6.2 6.2-6.22-6.19c-.44-.44-1.15-.44-1.59 0-.44.44-.44 1.15 0 1.59l6.2 6.21-6.2 6.2c-.42.46-.39 1.17.07 1.59.43.4 1.09.4 1.52 0L10 11.59l6.2 6.2c.44.44 1.15.44 1.59 0 .44-.45.44-1.16 0-1.6Z" |
| 83 |
/> |
| 84 |
</svg> |
| 85 |
</span> |
| 86 |
</button> |
| 87 |
</div> |
| 88 |
<div class="pf-v6-c-action-list__item"> |
| 89 |
<button class="pf-v6-c-button pf-m-plain" type="button" aria-label="Toggle"> |
| 90 |
<span class="pf-v6-c-button__icon"> |
| 91 |
<svg |
| 92 |
class="pf-v6-svg" |
| 93 |
fill="currentColor" |
| 94 |
viewBox="0 0 512 512" |
| 95 |
aria-hidden="true" |
| 96 |
role="img" |
| 97 |
width="1em" |
| 98 |
height="1em" |
| 99 |
> |
| 100 |
<path |
| 101 |
d="M173.898 439.404l-166.4-166.4c-9.997-9.997-9.997-26.206 0-36.204l36.203-36.204c9.997-9.998 26.207-9.998 36.204 0L192 312.69 432.095 72.596c9.997-9.997 26.207-9.997 36.204 0l36.203 36.204c9.997 9.997 9.997 26.206 0 36.204l-294.4 294.401c-9.998 9.997-26.207 9.997-36.204-.001z" |
| 102 |
/> |
| 103 |
</svg> |
| 104 |
</span> |
| 105 |
</button> |
| 106 |
</div> |
| 107 |
</div> |
| 108 |
<br />With group icons wrapper |
| 109 |
<div class="pf-v6-c-action-list"> |
| 110 |
<div class="pf-v6-c-action-list__group pf-m-icons"> |
| 111 |
<div class="pf-v6-c-action-list__item"> |
| 112 |
<button |
| 113 |
class="pf-v6-c-button pf-m-plain" |
| 114 |
type="button" |
| 115 |
aria-label="Close" |
| 116 |
> |
| 117 |
<span class="pf-v6-c-button__icon pf-m-start"> |
| 118 |
<svg |
| 119 |
class="pf-v6-svg" |
| 120 |
fill="currentColor" |
| 121 |
viewBox="0 0 20 20" |
| 122 |
aria-hidden="true" |
| 123 |
role="img" |
| 124 |
width="1em" |
| 125 |
height="1em" |
| 126 |
> |
| 127 |
<path |
| 128 |
d="M17.8 16.2 11.59 10l6.21-6.21c.42-.46.39-1.17-.07-1.59-.43-.4-1.09-.4-1.52 0l-6.2 6.2-6.22-6.19c-.44-.44-1.15-.44-1.59 0-.44.44-.44 1.15 0 1.59l6.2 6.21-6.2 6.2c-.42.46-.39 1.17.07 1.59.43.4 1.09.4 1.52 0L10 11.59l6.2 6.2c.44.44 1.15.44 1.59 0 .44-.45.44-1.16 0-1.6Z" |
| 129 |
/> |
| 130 |
</svg> |
| 131 |
</span> |
| 132 |
</button> |
| 133 |
</div> |
| 134 |
<div class="pf-v6-c-action-list__item"> |
| 135 |
<button |
| 136 |
class="pf-v6-c-button pf-m-plain" |
| 137 |
type="button" |
| 138 |
aria-label="Toggle" |
| 139 |
> |
| 140 |
<span class="pf-v6-c-button__icon"> |
| 141 |
<svg |
| 142 |
class="pf-v6-svg" |
| 143 |
fill="currentColor" |
| 144 |
viewBox="0 0 512 512" |
| 145 |
aria-hidden="true" |
| 146 |
role="img" |
| 147 |
width="1em" |
| 148 |
height="1em" |
| 149 |
> |
| 150 |
<path |
| 151 |
d="M173.898 439.404l-166.4-166.4c-9.997-9.997-9.997-26.206 0-36.204l36.203-36.204c9.997-9.998 26.207-9.998 36.204 0L192 312.69 432.095 72.596c9.997-9.997 26.207-9.997 36.204 0l36.203 36.204c9.997 9.997 9.997 26.206 0 36.204l-294.4 294.401c-9.998 9.997-26.207 9.997-36.204-.001z" |
| 152 |
/> |
| 153 |
</svg> |
| 154 |
</span> |
| 155 |
</button> |
| 156 |
</div> |
| 157 |
</div> |
| 158 |
<div class="pf-v6-c-action-list__group pf-m-icons"> |
| 159 |
<div class="pf-v6-c-action-list__item"> |
| 160 |
<button |
| 161 |
class="pf-v6-c-button pf-m-plain" |
| 162 |
type="button" |
| 163 |
aria-label="Close" |
| 164 |
> |
| 165 |
<span class="pf-v6-c-button__icon"> |
| 166 |
<svg |
| 167 |
class="pf-v6-svg" |
| 168 |
fill="currentColor" |
| 169 |
viewBox="0 0 20 20" |
| 170 |
aria-hidden="true" |
| 171 |
role="img" |
| 172 |
width="1em" |
| 173 |
height="1em" |
| 174 |
> |
| 175 |
<path |
| 176 |
d="M17.8 16.2 11.59 10l6.21-6.21c.42-.46.39-1.17-.07-1.59-.43-.4-1.09-.4-1.52 0l-6.2 6.2-6.22-6.19c-.44-.44-1.15-.44-1.59 0-.44.44-.44 1.15 0 1.59l6.2 6.21-6.2 6.2c-.42.46-.39 1.17.07 1.59.43.4 1.09.4 1.52 0L10 11.59l6.2 6.2c.44.44 1.15.44 1.59 0 .44-.45.44-1.16 0-1.6Z" |
| 177 |
/> |
| 178 |
</svg> |
| 179 |
</span> |
| 180 |
</button> |
| 181 |
</div> |
| 182 |
<div class="pf-v6-c-action-list__item"> |
| 183 |
<button |
| 184 |
class="pf-v6-c-button pf-m-plain" |
| 185 |
type="button" |
| 186 |
aria-label="Toggle" |
| 187 |
> |
| 188 |
<span class="pf-v6-c-button__icon"> |
| 189 |
<svg |
| 190 |
class="pf-v6-svg" |
| 191 |
fill="currentColor" |
| 192 |
viewBox="0 0 512 512" |
| 193 |
aria-hidden="true" |
| 194 |
role="img" |
| 195 |
width="1em" |
| 196 |
height="1em" |
| 197 |
> |
| 198 |
<path |
| 199 |
d="M173.898 439.404l-166.4-166.4c-9.997-9.997-9.997-26.206 0-36.204l36.203-36.204c9.997-9.998 26.207-9.998 36.204 0L192 312.69 432.095 72.596c9.997-9.997 26.207-9.997 36.204 0l36.203 36.204c9.997 9.997 9.997 26.206 0 36.204l-294.4 294.401c-9.998 9.997-26.207 9.997-36.204-.001z" |
| 200 |
/> |
| 201 |
</svg> |
| 202 |
</span> |
| 203 |
</button> |
| 204 |
</div> |
| 205 |
</div> |
| 206 |
</div> |
| 207 |
|
| 208 |
``` |
| 209 |
|
| 210 |
### Action list multiple groups |
| 211 |
|
| 212 |
```html |
| 213 |
<div class="pf-v6-c-action-list"> |
| 214 |
<div class="pf-v6-c-action-list__group"> |
| 215 |
<div class="pf-v6-c-action-list__item"> |
| 216 |
<button class="pf-v6-c-button pf-m-primary" type="button"> |
| 217 |
<span class="pf-v6-c-button__text">Next</span> |
| 218 |
</button> |
| 219 |
</div> |
| 220 |
<div class="pf-v6-c-action-list__item"> |
| 221 |
<button class="pf-v6-c-button pf-m-secondary" type="button"> |
| 222 |
<span class="pf-v6-c-button__text">Back</span> |
| 223 |
</button> |
| 224 |
</div> |
| 225 |
</div> |
| 226 |
<div class="pf-v6-c-action-list__group"> |
| 227 |
<div class="pf-v6-c-action-list__item"> |
| 228 |
<button class="pf-v6-c-button pf-m-primary" type="button"> |
| 229 |
<span class="pf-v6-c-button__text">Submit</span> |
| 230 |
</button> |
| 231 |
</div> |
| 232 |
<div class="pf-v6-c-action-list__item"> |
| 233 |
<button class="pf-v6-c-button pf-m-link" type="button"> |
| 234 |
<span class="pf-v6-c-button__text">Cancel</span> |
| 235 |
</button> |
| 236 |
</div> |
| 237 |
</div> |
| 238 |
</div> |
| 239 |
|
| 240 |
``` |
| 241 |
|
| 242 |
### Action list with cancel button |
| 243 |
|
| 244 |
```html |
| 245 |
In modals, forms, data lists |
| 246 |
<div class="pf-v6-c-action-list"> |
| 247 |
<div class="pf-v6-c-action-list__group"> |
| 248 |
<div class="pf-v6-c-action-list__item"> |
| 249 |
<button class="pf-v6-c-button pf-m-primary" type="button"> |
| 250 |
<span class="pf-v6-c-button__text">Save</span> |
| 251 |
</button> |
| 252 |
</div> |
| 253 |
<div class="pf-v6-c-action-list__item"> |
| 254 |
<button class="pf-v6-c-button pf-m-link" type="button"> |
| 255 |
<span class="pf-v6-c-button__text">Cancel</span> |
| 256 |
</button> |
| 257 |
</div> |
| 258 |
</div> |
| 259 |
</div> |
| 260 |
<br />In wizards |
| 261 |
<div class="pf-v6-c-action-list"> |
| 262 |
<div class="pf-v6-c-action-list__group"> |
| 263 |
<div class="pf-v6-c-action-list__item"> |
| 264 |
<button class="pf-v6-c-button pf-m-primary" type="button"> |
| 265 |
<span class="pf-v6-c-button__text">Next</span> |
| 266 |
</button> |
| 267 |
</div> |
| 268 |
<div class="pf-v6-c-action-list__item"> |
| 269 |
<button class="pf-v6-c-button pf-m-secondary" type="button"> |
| 270 |
<span class="pf-v6-c-button__text">Back</span> |
| 271 |
</button> |
| 272 |
</div> |
| 273 |
<div class="pf-v6-c-action-list__item"> |
| 274 |
<button class="pf-v6-c-button pf-m-link" type="button"> |
| 275 |
<span class="pf-v6-c-button__text">Cancel</span> |
| 276 |
</button> |
| 277 |
</div> |
| 278 |
</div> |
| 279 |
</div> |
| 280 |
|
| 281 |
``` |
| 282 |
|
| 283 |
### Vertical action list |
| 284 |
|
| 285 |
```html isBeta |
| 286 |
Multiple groups |
| 287 |
<div class="pf-v6-c-action-list pf-m-vertical"> |
| 288 |
<div class="pf-v6-c-action-list__group"> |
| 289 |
<div class="pf-v6-c-action-list__item"> |
| 290 |
<button class="pf-v6-c-button pf-m-primary" type="button"> |
| 291 |
<span class="pf-v6-c-button__text">Next</span> |
| 292 |
</button> |
| 293 |
</div> |
| 294 |
<div class="pf-v6-c-action-list__item"> |
| 295 |
<button class="pf-v6-c-button pf-m-secondary" type="button"> |
| 296 |
<span class="pf-v6-c-button__text">Back</span> |
| 297 |
</button> |
| 298 |
</div> |
| 299 |
</div> |
| 300 |
<div class="pf-v6-c-action-list__group"> |
| 301 |
<div class="pf-v6-c-action-list__item"> |
| 302 |
<button class="pf-v6-c-button pf-m-primary" type="button"> |
| 303 |
<span class="pf-v6-c-button__text">Submit</span> |
| 304 |
</button> |
| 305 |
</div> |
| 306 |
<div class="pf-v6-c-action-list__item"> |
| 307 |
<button class="pf-v6-c-button pf-m-link" type="button"> |
| 308 |
<span class="pf-v6-c-button__text">Cancel</span> |
| 309 |
</button> |
| 310 |
</div> |
| 311 |
</div> |
| 312 |
</div><br/ > |
| 313 |
Icons, in two groups |
| 314 |
<div class="pf-v6-c-action-list pf-m-vertical"> |
| 315 |
<div class="pf-v6-c-action-list__group pf-m-icons"> |
| 316 |
<div class="pf-v6-c-action-list__item"> |
| 317 |
<button |
| 318 |
class="pf-v6-c-button pf-m-plain" |
| 319 |
type="button" |
| 320 |
aria-label="Close" |
| 321 |
> |
| 322 |
<span class="pf-v6-c-button__icon pf-m-start"> |
| 323 |
<svg |
| 324 |
class="pf-v6-svg" |
| 325 |
fill="currentColor" |
| 326 |
viewBox="0 0 20 20" |
| 327 |
aria-hidden="true" |
| 328 |
role="img" |
| 329 |
width="1em" |
| 330 |
height="1em" |
| 331 |
> |
| 332 |
<path |
| 333 |
d="M17.8 16.2 11.59 10l6.21-6.21c.42-.46.39-1.17-.07-1.59-.43-.4-1.09-.4-1.52 0l-6.2 6.2-6.22-6.19c-.44-.44-1.15-.44-1.59 0-.44.44-.44 1.15 0 1.59l6.2 6.21-6.2 6.2c-.42.46-.39 1.17.07 1.59.43.4 1.09.4 1.52 0L10 11.59l6.2 6.2c.44.44 1.15.44 1.59 0 .44-.45.44-1.16 0-1.6Z" |
| 334 |
/> |
| 335 |
</svg> |
| 336 |
</span> |
| 337 |
</button> |
| 338 |
</div> |
| 339 |
<div class="pf-v6-c-action-list__item"> |
| 340 |
<button |
| 341 |
class="pf-v6-c-button pf-m-plain" |
| 342 |
type="button" |
| 343 |
aria-label="Toggle" |
| 344 |
> |
| 345 |
<span class="pf-v6-c-button__icon"> |
| 346 |
<svg |
| 347 |
class="pf-v6-svg" |
| 348 |
fill="currentColor" |
| 349 |
viewBox="0 0 512 512" |
| 350 |
aria-hidden="true" |
| 351 |
role="img" |
| 352 |
width="1em" |
| 353 |
height="1em" |
| 354 |
> |
| 355 |
<path |
| 356 |
d="M173.898 439.404l-166.4-166.4c-9.997-9.997-9.997-26.206 0-36.204l36.203-36.204c9.997-9.998 26.207-9.998 36.204 0L192 312.69 432.095 72.596c9.997-9.997 26.207-9.997 36.204 0l36.203 36.204c9.997 9.997 9.997 26.206 0 36.204l-294.4 294.401c-9.998 9.997-26.207 9.997-36.204-.001z" |
| 357 |
/> |
| 358 |
</svg> |
| 359 |
</span> |
| 360 |
</button> |
| 361 |
</div> |
| 362 |
</div> |
| 363 |
<div class="pf-v6-c-action-list__group pf-m-icons"> |
| 364 |
<div class="pf-v6-c-action-list__item"> |
| 365 |
<button |
| 366 |
class="pf-v6-c-button pf-m-plain" |
| 367 |
type="button" |
| 368 |
aria-label="Close" |
| 369 |
> |
| 370 |
<span class="pf-v6-c-button__icon"> |
| 371 |
<svg |
| 372 |
class="pf-v6-svg" |
| 373 |
fill="currentColor" |
| 374 |
viewBox="0 0 20 20" |
| 375 |
aria-hidden="true" |
| 376 |
role="img" |
| 377 |
width="1em" |
| 378 |
height="1em" |
| 379 |
> |
| 380 |
<path |
| 381 |
d="M17.8 16.2 11.59 10l6.21-6.21c.42-.46.39-1.17-.07-1.59-.43-.4-1.09-.4-1.52 0l-6.2 6.2-6.22-6.19c-.44-.44-1.15-.44-1.59 0-.44.44-.44 1.15 0 1.59l6.2 6.21-6.2 6.2c-.42.46-.39 1.17.07 1.59.43.4 1.09.4 1.52 0L10 11.59l6.2 6.2c.44.44 1.15.44 1.59 0 .44-.45.44-1.16 0-1.6Z" |
| 382 |
/> |
| 383 |
</svg> |
| 384 |
</span> |
| 385 |
</button> |
| 386 |
</div> |
| 387 |
<div class="pf-v6-c-action-list__item"> |
| 388 |
<button |
| 389 |
class="pf-v6-c-button pf-m-plain" |
| 390 |
type="button" |
| 391 |
aria-label="Toggle" |
| 392 |
> |
| 393 |
<span class="pf-v6-c-button__icon"> |
| 394 |
<svg |
| 395 |
class="pf-v6-svg" |
| 396 |
fill="currentColor" |
| 397 |
viewBox="0 0 512 512" |
| 398 |
aria-hidden="true" |
| 399 |
role="img" |
| 400 |
width="1em" |
| 401 |
height="1em" |
| 402 |
> |
| 403 |
<path |
| 404 |
d="M173.898 439.404l-166.4-166.4c-9.997-9.997-9.997-26.206 0-36.204l36.203-36.204c9.997-9.998 26.207-9.998 36.204 0L192 312.69 432.095 72.596c9.997-9.997 26.207-9.997 36.204 0l36.203 36.204c9.997 9.997 9.997 26.206 0 36.204l-294.4 294.401c-9.998 9.997-26.207 9.997-36.204-.001z" |
| 405 |
/> |
| 406 |
</svg> |
| 407 |
</span> |
| 408 |
</button> |
| 409 |
</div> |
| 410 |
</div> |
| 411 |
</div> |
| 412 |
|
| 413 |
``` |
| 414 |
|
| 415 |
### Overview |
| 416 |
|
| 417 |
### Usage |
| 418 |
|
| 419 |
| Attribute | Applied to | Outcome | |
| 420 |
| -- | -- | -- | |
| 421 |
| `.pf-v6-c-action-list` | `<div>` | Initiates the action list container. | |
| 422 |
| `.pf-v6-c-action-list__item` | `<div>` | Initiates the action list item container. | |
| 423 |
| `.pf-v6-c-action-list__group` | `<div>` | Initiates the action list group container. | |
| 424 |
| `.pf-m-icons` | `.pf-v6-c-action-list`, `.pf-v6-c-action-list__group` | Modifies the action list and/or group to support icon buttons. If applied to `.pf-v6-c-action-list`, all nested groups will inherit this modification. | |
| 425 |
| `.pf-m-vertical` | `.pf-v6-c-action-list` | Modifies the action list to display vertically. | |