| 1 |
--- |
| 2 |
id: Accordion |
| 3 |
section: components |
| 4 |
cssPrefix: pf-v6-c-accordion |
| 5 |
---## Examples |
| 6 |
|
| 7 |
### Fluid |
| 8 |
|
| 9 |
```html |
| 10 |
<div class="pf-v6-c-accordion"> |
| 11 |
<div class="pf-v6-c-accordion__item"> |
| 12 |
<h3> |
| 13 |
<button |
| 14 |
class="pf-v6-c-accordion__toggle" |
| 15 |
type="button" |
| 16 |
aria-expanded="false" |
| 17 |
> |
| 18 |
<span class="pf-v6-c-accordion__toggle-text">Item one</span> |
| 19 |
|
| 20 |
<span class="pf-v6-c-accordion__toggle-icon"> |
| 21 |
<svg |
| 22 |
class="pf-v6-svg" |
| 23 |
fill="currentColor" |
| 24 |
viewBox="0 0 20 20" |
| 25 |
aria-hidden="true" |
| 26 |
role="img" |
| 27 |
width="1em" |
| 28 |
height="1em" |
| 29 |
> |
| 30 |
<path |
| 31 |
d="M18.71 5.29a.996.996 0 0 0-1.41 0l-7.29 7.29-7.3-7.29a.987.987 0 0 0-1.41-.02.987.987 0 0 0-.02 1.41l.02.02 7.65 7.65c.29.29.68.44 1.06.44s.77-.15 1.06-.44l7.65-7.65a.996.996 0 0 0 0-1.41Z" |
| 32 |
/> |
| 33 |
</svg> |
| 34 |
</span> |
| 35 |
</button> |
| 36 |
</h3> |
| 37 |
<div class="pf-v6-c-accordion__expandable-content" hidden> |
| 38 |
<div |
| 39 |
class="pf-v6-c-accordion__expandable-content-body" |
| 40 |
>This text is hidden</div> |
| 41 |
</div> |
| 42 |
</div> |
| 43 |
|
| 44 |
<div class="pf-v6-c-accordion__item"> |
| 45 |
<h3> |
| 46 |
<button |
| 47 |
class="pf-v6-c-accordion__toggle" |
| 48 |
type="button" |
| 49 |
aria-expanded="false" |
| 50 |
> |
| 51 |
<span class="pf-v6-c-accordion__toggle-text">Item two</span> |
| 52 |
|
| 53 |
<span class="pf-v6-c-accordion__toggle-icon"> |
| 54 |
<svg |
| 55 |
class="pf-v6-svg" |
| 56 |
fill="currentColor" |
| 57 |
viewBox="0 0 20 20" |
| 58 |
aria-hidden="true" |
| 59 |
role="img" |
| 60 |
width="1em" |
| 61 |
height="1em" |
| 62 |
> |
| 63 |
<path |
| 64 |
d="M18.71 5.29a.996.996 0 0 0-1.41 0l-7.29 7.29-7.3-7.29a.987.987 0 0 0-1.41-.02.987.987 0 0 0-.02 1.41l.02.02 7.65 7.65c.29.29.68.44 1.06.44s.77-.15 1.06-.44l7.65-7.65a.996.996 0 0 0 0-1.41Z" |
| 65 |
/> |
| 66 |
</svg> |
| 67 |
</span> |
| 68 |
</button> |
| 69 |
</h3> |
| 70 |
<div class="pf-v6-c-accordion__expandable-content" hidden> |
| 71 |
<div |
| 72 |
class="pf-v6-c-accordion__expandable-content-body" |
| 73 |
>This text is hidden</div> |
| 74 |
</div> |
| 75 |
</div> |
| 76 |
|
| 77 |
<div class="pf-v6-c-accordion__item"> |
| 78 |
<h3> |
| 79 |
<button |
| 80 |
class="pf-v6-c-accordion__toggle" |
| 81 |
type="button" |
| 82 |
aria-expanded="false" |
| 83 |
> |
| 84 |
<span class="pf-v6-c-accordion__toggle-text">Item three</span> |
| 85 |
|
| 86 |
<span class="pf-v6-c-accordion__toggle-icon"> |
| 87 |
<svg |
| 88 |
class="pf-v6-svg" |
| 89 |
fill="currentColor" |
| 90 |
viewBox="0 0 20 20" |
| 91 |
aria-hidden="true" |
| 92 |
role="img" |
| 93 |
width="1em" |
| 94 |
height="1em" |
| 95 |
> |
| 96 |
<path |
| 97 |
d="M18.71 5.29a.996.996 0 0 0-1.41 0l-7.29 7.29-7.3-7.29a.987.987 0 0 0-1.41-.02.987.987 0 0 0-.02 1.41l.02.02 7.65 7.65c.29.29.68.44 1.06.44s.77-.15 1.06-.44l7.65-7.65a.996.996 0 0 0 0-1.41Z" |
| 98 |
/> |
| 99 |
</svg> |
| 100 |
</span> |
| 101 |
</button> |
| 102 |
</h3> |
| 103 |
<div class="pf-v6-c-accordion__expandable-content" hidden> |
| 104 |
<div |
| 105 |
class="pf-v6-c-accordion__expandable-content-body" |
| 106 |
>This text is hidden</div> |
| 107 |
</div> |
| 108 |
</div> |
| 109 |
|
| 110 |
<div class="pf-v6-c-accordion__item pf-m-expanded"> |
| 111 |
<h3> |
| 112 |
<button |
| 113 |
class="pf-v6-c-accordion__toggle" |
| 114 |
type="button" |
| 115 |
aria-expanded="true" |
| 116 |
> |
| 117 |
<span class="pf-v6-c-accordion__toggle-text">Item four</span> |
| 118 |
|
| 119 |
<span class="pf-v6-c-accordion__toggle-icon"> |
| 120 |
<svg |
| 121 |
class="pf-v6-svg" |
| 122 |
fill="currentColor" |
| 123 |
viewBox="0 0 20 20" |
| 124 |
aria-hidden="true" |
| 125 |
role="img" |
| 126 |
width="1em" |
| 127 |
height="1em" |
| 128 |
> |
| 129 |
<path |
| 130 |
d="M18.71 5.29a.996.996 0 0 0-1.41 0l-7.29 7.29-7.3-7.29a.987.987 0 0 0-1.41-.02.987.987 0 0 0-.02 1.41l.02.02 7.65 7.65c.29.29.68.44 1.06.44s.77-.15 1.06-.44l7.65-7.65a.996.996 0 0 0 0-1.41Z" |
| 131 |
/> |
| 132 |
</svg> |
| 133 |
</span> |
| 134 |
</button> |
| 135 |
</h3> |
| 136 |
<div class="pf-v6-c-accordion__expandable-content"> |
| 137 |
<div |
| 138 |
class="pf-v6-c-accordion__expandable-content-body" |
| 139 |
>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis molestie lorem lacinia dolor aliquet faucibus. Suspendisse gravida imperdiet accumsan. Aenean auctor lorem justo, vitae tincidunt enim blandit vel. Aenean quis tempus dolor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.</div> |
| 140 |
</div> |
| 141 |
</div> |
| 142 |
|
| 143 |
<div class="pf-v6-c-accordion__item"> |
| 144 |
<h3> |
| 145 |
<button |
| 146 |
class="pf-v6-c-accordion__toggle" |
| 147 |
type="button" |
| 148 |
aria-expanded="false" |
| 149 |
> |
| 150 |
<span class="pf-v6-c-accordion__toggle-text">Item five</span> |
| 151 |
|
| 152 |
<span class="pf-v6-c-accordion__toggle-icon"> |
| 153 |
<svg |
| 154 |
class="pf-v6-svg" |
| 155 |
fill="currentColor" |
| 156 |
viewBox="0 0 20 20" |
| 157 |
aria-hidden="true" |
| 158 |
role="img" |
| 159 |
width="1em" |
| 160 |
height="1em" |
| 161 |
> |
| 162 |
<path |
| 163 |
d="M18.71 5.29a.996.996 0 0 0-1.41 0l-7.29 7.29-7.3-7.29a.987.987 0 0 0-1.41-.02.987.987 0 0 0-.02 1.41l.02.02 7.65 7.65c.29.29.68.44 1.06.44s.77-.15 1.06-.44l7.65-7.65a.996.996 0 0 0 0-1.41Z" |
| 164 |
/> |
| 165 |
</svg> |
| 166 |
</span> |
| 167 |
</button> |
| 168 |
</h3> |
| 169 |
<div class="pf-v6-c-accordion__expandable-content" hidden> |
| 170 |
<div |
| 171 |
class="pf-v6-c-accordion__expandable-content-body" |
| 172 |
>This text is hidden</div> |
| 173 |
</div> |
| 174 |
</div> |
| 175 |
</div> |
| 176 |
|
| 177 |
``` |
| 178 |
|
| 179 |
### Fixed |
| 180 |
|
| 181 |
```html |
| 182 |
<div class="pf-v6-c-accordion"> |
| 183 |
<div class="pf-v6-c-accordion__item"> |
| 184 |
<h3> |
| 185 |
<button |
| 186 |
class="pf-v6-c-accordion__toggle" |
| 187 |
type="button" |
| 188 |
aria-expanded="false" |
| 189 |
> |
| 190 |
<span class="pf-v6-c-accordion__toggle-text">Item one</span> |
| 191 |
|
| 192 |
<span class="pf-v6-c-accordion__toggle-icon"> |
| 193 |
<svg |
| 194 |
class="pf-v6-svg" |
| 195 |
fill="currentColor" |
| 196 |
viewBox="0 0 20 20" |
| 197 |
aria-hidden="true" |
| 198 |
role="img" |
| 199 |
width="1em" |
| 200 |
height="1em" |
| 201 |
> |
| 202 |
<path |
| 203 |
d="M18.71 5.29a.996.996 0 0 0-1.41 0l-7.29 7.29-7.3-7.29a.987.987 0 0 0-1.41-.02.987.987 0 0 0-.02 1.41l.02.02 7.65 7.65c.29.29.68.44 1.06.44s.77-.15 1.06-.44l7.65-7.65a.996.996 0 0 0 0-1.41Z" |
| 204 |
/> |
| 205 |
</svg> |
| 206 |
</span> |
| 207 |
</button> |
| 208 |
</h3> |
| 209 |
<div class="pf-v6-c-accordion__expandable-content" hidden> |
| 210 |
<div |
| 211 |
class="pf-v6-c-accordion__expandable-content-body" |
| 212 |
>This text is hidden</div> |
| 213 |
</div> |
| 214 |
</div> |
| 215 |
|
| 216 |
<div class="pf-v6-c-accordion__item pf-m-expanded"> |
| 217 |
<h3> |
| 218 |
<button |
| 219 |
class="pf-v6-c-accordion__toggle" |
| 220 |
type="button" |
| 221 |
aria-expanded="true" |
| 222 |
id="accordion-fixed-item-two-toggle" |
| 223 |
> |
| 224 |
<span class="pf-v6-c-accordion__toggle-text">Item two</span> |
| 225 |
|
| 226 |
<span class="pf-v6-c-accordion__toggle-icon"> |
| 227 |
<svg |
| 228 |
class="pf-v6-svg" |
| 229 |
fill="currentColor" |
| 230 |
viewBox="0 0 20 20" |
| 231 |
aria-hidden="true" |
| 232 |
role="img" |
| 233 |
width="1em" |
| 234 |
height="1em" |
| 235 |
> |
| 236 |
<path |
| 237 |
d="M18.71 5.29a.996.996 0 0 0-1.41 0l-7.29 7.29-7.3-7.29a.987.987 0 0 0-1.41-.02.987.987 0 0 0-.02 1.41l.02.02 7.65 7.65c.29.29.68.44 1.06.44s.77-.15 1.06-.44l7.65-7.65a.996.996 0 0 0 0-1.41Z" |
| 238 |
/> |
| 239 |
</svg> |
| 240 |
</span> |
| 241 |
</button> |
| 242 |
</h3> |
| 243 |
<div |
| 244 |
class="pf-v6-c-accordion__expandable-content pf-m-fixed" |
| 245 |
role="region" |
| 246 |
tabindex="0" |
| 247 |
aria-labelledby="accordion-fixed-item-two-toggle" |
| 248 |
> |
| 249 |
<div |
| 250 |
class="pf-v6-c-accordion__expandable-content-body" |
| 251 |
>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis molestie lorem lacinia dolor aliquet faucibus. Suspendisse gravida imperdiet accumsan. Aenean auctor lorem justo, vitae tincidunt enim blandit vel. Aenean quis tempus dolor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.</div> |
| 252 |
<div |
| 253 |
class="pf-v6-c-accordion__expandable-content-body" |
| 254 |
>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis molestie lorem lacinia dolor aliquet faucibus. Suspendisse gravida imperdiet accumsan. Aenean auctor lorem justo, vitae tincidunt enim blandit vel. Aenean quis tempus dolor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.</div> |
| 255 |
<div |
| 256 |
class="pf-v6-c-accordion__expandable-content-body" |
| 257 |
>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis molestie lorem lacinia dolor aliquet faucibus. Suspendisse gravida imperdiet accumsan. Aenean auctor lorem justo, vitae tincidunt enim blandit vel. Aenean quis tempus dolor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.</div> |
| 258 |
</div> |
| 259 |
</div> |
| 260 |
|
| 261 |
<div class="pf-v6-c-accordion__item"> |
| 262 |
<h3> |
| 263 |
<button |
| 264 |
class="pf-v6-c-accordion__toggle" |
| 265 |
type="button" |
| 266 |
aria-expanded="false" |
| 267 |
> |
| 268 |
<span class="pf-v6-c-accordion__toggle-text">Item three</span> |
| 269 |
|
| 270 |
<span class="pf-v6-c-accordion__toggle-icon"> |
| 271 |
<svg |
| 272 |
class="pf-v6-svg" |
| 273 |
fill="currentColor" |
| 274 |
viewBox="0 0 20 20" |
| 275 |
aria-hidden="true" |
| 276 |
role="img" |
| 277 |
width="1em" |
| 278 |
height="1em" |
| 279 |
> |
| 280 |
<path |
| 281 |
d="M18.71 5.29a.996.996 0 0 0-1.41 0l-7.29 7.29-7.3-7.29a.987.987 0 0 0-1.41-.02.987.987 0 0 0-.02 1.41l.02.02 7.65 7.65c.29.29.68.44 1.06.44s.77-.15 1.06-.44l7.65-7.65a.996.996 0 0 0 0-1.41Z" |
| 282 |
/> |
| 283 |
</svg> |
| 284 |
</span> |
| 285 |
</button> |
| 286 |
</h3> |
| 287 |
<div class="pf-v6-c-accordion__expandable-content" hidden> |
| 288 |
<div |
| 289 |
class="pf-v6-c-accordion__expandable-content-body" |
| 290 |
>This text is hidden</div> |
| 291 |
</div> |
| 292 |
</div> |
| 293 |
|
| 294 |
<div class="pf-v6-c-accordion__item"> |
| 295 |
<h3> |
| 296 |
<button |
| 297 |
class="pf-v6-c-accordion__toggle" |
| 298 |
type="button" |
| 299 |
aria-expanded="false" |
| 300 |
> |
| 301 |
<span class="pf-v6-c-accordion__toggle-text">Item four</span> |
| 302 |
|
| 303 |
<span class="pf-v6-c-accordion__toggle-icon"> |
| 304 |
<svg |
| 305 |
class="pf-v6-svg" |
| 306 |
fill="currentColor" |
| 307 |
viewBox="0 0 20 20" |
| 308 |
aria-hidden="true" |
| 309 |
role="img" |
| 310 |
width="1em" |
| 311 |
height="1em" |
| 312 |
> |
| 313 |
<path |
| 314 |
d="M18.71 5.29a.996.996 0 0 0-1.41 0l-7.29 7.29-7.3-7.29a.987.987 0 0 0-1.41-.02.987.987 0 0 0-.02 1.41l.02.02 7.65 7.65c.29.29.68.44 1.06.44s.77-.15 1.06-.44l7.65-7.65a.996.996 0 0 0 0-1.41Z" |
| 315 |
/> |
| 316 |
</svg> |
| 317 |
</span> |
| 318 |
</button> |
| 319 |
</h3> |
| 320 |
<div class="pf-v6-c-accordion__expandable-content" hidden> |
| 321 |
<div |
| 322 |
class="pf-v6-c-accordion__expandable-content-body" |
| 323 |
>This text is hidden</div> |
| 324 |
</div> |
| 325 |
</div> |
| 326 |
|
| 327 |
<div class="pf-v6-c-accordion__item"> |
| 328 |
<h3> |
| 329 |
<button |
| 330 |
class="pf-v6-c-accordion__toggle" |
| 331 |
type="button" |
| 332 |
aria-expanded="false" |
| 333 |
> |
| 334 |
<span class="pf-v6-c-accordion__toggle-text">Item five</span> |
| 335 |
|
| 336 |
<span class="pf-v6-c-accordion__toggle-icon"> |
| 337 |
<svg |
| 338 |
class="pf-v6-svg" |
| 339 |
fill="currentColor" |
| 340 |
viewBox="0 0 20 20" |
| 341 |
aria-hidden="true" |
| 342 |
role="img" |
| 343 |
width="1em" |
| 344 |
height="1em" |
| 345 |
> |
| 346 |
<path |
| 347 |
d="M18.71 5.29a.996.996 0 0 0-1.41 0l-7.29 7.29-7.3-7.29a.987.987 0 0 0-1.41-.02.987.987 0 0 0-.02 1.41l.02.02 7.65 7.65c.29.29.68.44 1.06.44s.77-.15 1.06-.44l7.65-7.65a.996.996 0 0 0 0-1.41Z" |
| 348 |
/> |
| 349 |
</svg> |
| 350 |
</span> |
| 351 |
</button> |
| 352 |
</h3> |
| 353 |
<div class="pf-v6-c-accordion__expandable-content" hidden> |
| 354 |
<div |
| 355 |
class="pf-v6-c-accordion__expandable-content-body" |
| 356 |
>This text is hidden</div> |
| 357 |
</div> |
| 358 |
</div> |
| 359 |
</div> |
| 360 |
|
| 361 |
``` |
| 362 |
|
| 363 |
### Definition list |
| 364 |
|
| 365 |
```html |
| 366 |
<dl class="pf-v6-c-accordion"> |
| 367 |
<div class="pf-v6-c-accordion__item"> |
| 368 |
<dt> |
| 369 |
<button |
| 370 |
class="pf-v6-c-accordion__toggle" |
| 371 |
type="button" |
| 372 |
aria-expanded="false" |
| 373 |
> |
| 374 |
<span class="pf-v6-c-accordion__toggle-text">Item one</span> |
| 375 |
|
| 376 |
<span class="pf-v6-c-accordion__toggle-icon"> |
| 377 |
<svg |
| 378 |
class="pf-v6-svg" |
| 379 |
fill="currentColor" |
| 380 |
viewBox="0 0 20 20" |
| 381 |
aria-hidden="true" |
| 382 |
role="img" |
| 383 |
width="1em" |
| 384 |
height="1em" |
| 385 |
> |
| 386 |
<path |
| 387 |
d="M18.71 5.29a.996.996 0 0 0-1.41 0l-7.29 7.29-7.3-7.29a.987.987 0 0 0-1.41-.02.987.987 0 0 0-.02 1.41l.02.02 7.65 7.65c.29.29.68.44 1.06.44s.77-.15 1.06-.44l7.65-7.65a.996.996 0 0 0 0-1.41Z" |
| 388 |
/> |
| 389 |
</svg> |
| 390 |
</span> |
| 391 |
</button> |
| 392 |
</dt> |
| 393 |
<dd class="pf-v6-c-accordion__expandable-content" hidden> |
| 394 |
<div |
| 395 |
class="pf-v6-c-accordion__expandable-content-body" |
| 396 |
>This text is hidden</div> |
| 397 |
</dd> |
| 398 |
</div> |
| 399 |
|
| 400 |
<div class="pf-v6-c-accordion__item"> |
| 401 |
<dt> |
| 402 |
<button |
| 403 |
class="pf-v6-c-accordion__toggle" |
| 404 |
type="button" |
| 405 |
aria-expanded="false" |
| 406 |
> |
| 407 |
<span class="pf-v6-c-accordion__toggle-text">Item two</span> |
| 408 |
|
| 409 |
<span class="pf-v6-c-accordion__toggle-icon"> |
| 410 |
<svg |
| 411 |
class="pf-v6-svg" |
| 412 |
fill="currentColor" |
| 413 |
viewBox="0 0 20 20" |
| 414 |
aria-hidden="true" |
| 415 |
role="img" |
| 416 |
width="1em" |
| 417 |
height="1em" |
| 418 |
> |
| 419 |
<path |
| 420 |
d="M18.71 5.29a.996.996 0 0 0-1.41 0l-7.29 7.29-7.3-7.29a.987.987 0 0 0-1.41-.02.987.987 0 0 0-.02 1.41l.02.02 7.65 7.65c.29.29.68.44 1.06.44s.77-.15 1.06-.44l7.65-7.65a.996.996 0 0 0 0-1.41Z" |
| 421 |
/> |
| 422 |
</svg> |
| 423 |
</span> |
| 424 |
</button> |
| 425 |
</dt> |
| 426 |
<dd class="pf-v6-c-accordion__expandable-content" hidden> |
| 427 |
<div |
| 428 |
class="pf-v6-c-accordion__expandable-content-body" |
| 429 |
>This text is hidden</div> |
| 430 |
</dd> |
| 431 |
</div> |
| 432 |
|
| 433 |
<div class="pf-v6-c-accordion__item"> |
| 434 |
<dt> |
| 435 |
<button |
| 436 |
class="pf-v6-c-accordion__toggle" |
| 437 |
type="button" |
| 438 |
aria-expanded="false" |
| 439 |
> |
| 440 |
<span class="pf-v6-c-accordion__toggle-text">Item three</span> |
| 441 |
|
| 442 |
<span class="pf-v6-c-accordion__toggle-icon"> |
| 443 |
<svg |
| 444 |
class="pf-v6-svg" |
| 445 |
fill="currentColor" |
| 446 |
viewBox="0 0 20 20" |
| 447 |
aria-hidden="true" |
| 448 |
role="img" |
| 449 |
width="1em" |
| 450 |
height="1em" |
| 451 |
> |
| 452 |
<path |
| 453 |
d="M18.71 5.29a.996.996 0 0 0-1.41 0l-7.29 7.29-7.3-7.29a.987.987 0 0 0-1.41-.02.987.987 0 0 0-.02 1.41l.02.02 7.65 7.65c.29.29.68.44 1.06.44s.77-.15 1.06-.44l7.65-7.65a.996.996 0 0 0 0-1.41Z" |
| 454 |
/> |
| 455 |
</svg> |
| 456 |
</span> |
| 457 |
</button> |
| 458 |
</dt> |
| 459 |
<dd class="pf-v6-c-accordion__expandable-content" hidden> |
| 460 |
<div |
| 461 |
class="pf-v6-c-accordion__expandable-content-body" |
| 462 |
>This text is hidden</div> |
| 463 |
</dd> |
| 464 |
</div> |
| 465 |
|
| 466 |
<div class="pf-v6-c-accordion__item pf-m-expanded"> |
| 467 |
<dt> |
| 468 |
<button |
| 469 |
class="pf-v6-c-accordion__toggle" |
| 470 |
type="button" |
| 471 |
aria-expanded="true" |
| 472 |
> |
| 473 |
<span class="pf-v6-c-accordion__toggle-text">Item four</span> |
| 474 |
|
| 475 |
<span class="pf-v6-c-accordion__toggle-icon"> |
| 476 |
<svg |
| 477 |
class="pf-v6-svg" |
| 478 |
fill="currentColor" |
| 479 |
viewBox="0 0 20 20" |
| 480 |
aria-hidden="true" |
| 481 |
role="img" |
| 482 |
width="1em" |
| 483 |
height="1em" |
| 484 |
> |
| 485 |
<path |
| 486 |
d="M18.71 5.29a.996.996 0 0 0-1.41 0l-7.29 7.29-7.3-7.29a.987.987 0 0 0-1.41-.02.987.987 0 0 0-.02 1.41l.02.02 7.65 7.65c.29.29.68.44 1.06.44s.77-.15 1.06-.44l7.65-7.65a.996.996 0 0 0 0-1.41Z" |
| 487 |
/> |
| 488 |
</svg> |
| 489 |
</span> |
| 490 |
</button> |
| 491 |
</dt> |
| 492 |
<dd class="pf-v6-c-accordion__expandable-content"> |
| 493 |
<div |
| 494 |
class="pf-v6-c-accordion__expandable-content-body" |
| 495 |
>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis molestie lorem lacinia dolor aliquet faucibus. Suspendisse gravida imperdiet accumsan. Aenean auctor lorem justo, vitae tincidunt enim blandit vel. Aenean quis tempus dolor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.</div> |
| 496 |
</dd> |
| 497 |
</div> |
| 498 |
|
| 499 |
<div class="pf-v6-c-accordion__item"> |
| 500 |
<dt> |
| 501 |
<button |
| 502 |
class="pf-v6-c-accordion__toggle" |
| 503 |
type="button" |
| 504 |
aria-expanded="false" |
| 505 |
> |
| 506 |
<span class="pf-v6-c-accordion__toggle-text">Item five</span> |
| 507 |
|
| 508 |
<span class="pf-v6-c-accordion__toggle-icon"> |
| 509 |
<svg |
| 510 |
class="pf-v6-svg" |
| 511 |
fill="currentColor" |
| 512 |
viewBox="0 0 20 20" |
| 513 |
aria-hidden="true" |
| 514 |
role="img" |
| 515 |
width="1em" |
| 516 |
height="1em" |
| 517 |
> |
| 518 |
<path |
| 519 |
d="M18.71 5.29a.996.996 0 0 0-1.41 0l-7.29 7.29-7.3-7.29a.987.987 0 0 0-1.41-.02.987.987 0 0 0-.02 1.41l.02.02 7.65 7.65c.29.29.68.44 1.06.44s.77-.15 1.06-.44l7.65-7.65a.996.996 0 0 0 0-1.41Z" |
| 520 |
/> |
| 521 |
</svg> |
| 522 |
</span> |
| 523 |
</button> |
| 524 |
</dt> |
| 525 |
<dd class="pf-v6-c-accordion__expandable-content" hidden> |
| 526 |
<div |
| 527 |
class="pf-v6-c-accordion__expandable-content-body" |
| 528 |
>This text is hidden</div> |
| 529 |
</dd> |
| 530 |
</div> |
| 531 |
</dl> |
| 532 |
|
| 533 |
``` |
| 534 |
|
| 535 |
### Bordered |
| 536 |
|
| 537 |
```html |
| 538 |
<div class="pf-v6-c-accordion pf-m-bordered"> |
| 539 |
<div class="pf-v6-c-accordion__item"> |
| 540 |
<h3> |
| 541 |
<button |
| 542 |
class="pf-v6-c-accordion__toggle" |
| 543 |
type="button" |
| 544 |
aria-expanded="false" |
| 545 |
> |
| 546 |
<span class="pf-v6-c-accordion__toggle-text">Item one</span> |
| 547 |
|
| 548 |
<span class="pf-v6-c-accordion__toggle-icon"> |
| 549 |
<svg |
| 550 |
class="pf-v6-svg" |
| 551 |
fill="currentColor" |
| 552 |
viewBox="0 0 20 20" |
| 553 |
aria-hidden="true" |
| 554 |
role="img" |
| 555 |
width="1em" |
| 556 |
height="1em" |
| 557 |
> |
| 558 |
<path |
| 559 |
d="M18.71 5.29a.996.996 0 0 0-1.41 0l-7.29 7.29-7.3-7.29a.987.987 0 0 0-1.41-.02.987.987 0 0 0-.02 1.41l.02.02 7.65 7.65c.29.29.68.44 1.06.44s.77-.15 1.06-.44l7.65-7.65a.996.996 0 0 0 0-1.41Z" |
| 560 |
/> |
| 561 |
</svg> |
| 562 |
</span> |
| 563 |
</button> |
| 564 |
</h3> |
| 565 |
<div class="pf-v6-c-accordion__expandable-content" hidden> |
| 566 |
<div |
| 567 |
class="pf-v6-c-accordion__expandable-content-body" |
| 568 |
>This text is hidden</div> |
| 569 |
</div> |
| 570 |
</div> |
| 571 |
|
| 572 |
<div class="pf-v6-c-accordion__item"> |
| 573 |
<h3> |
| 574 |
<button |
| 575 |
class="pf-v6-c-accordion__toggle" |
| 576 |
type="button" |
| 577 |
aria-expanded="false" |
| 578 |
> |
| 579 |
<span class="pf-v6-c-accordion__toggle-text">Item two</span> |
| 580 |
|
| 581 |
<span class="pf-v6-c-accordion__toggle-icon"> |
| 582 |
<svg |
| 583 |
class="pf-v6-svg" |
| 584 |
fill="currentColor" |
| 585 |
viewBox="0 0 20 20" |
| 586 |
aria-hidden="true" |
| 587 |
role="img" |
| 588 |
width="1em" |
| 589 |
height="1em" |
| 590 |
> |
| 591 |
<path |
| 592 |
d="M18.71 5.29a.996.996 0 0 0-1.41 0l-7.29 7.29-7.3-7.29a.987.987 0 0 0-1.41-.02.987.987 0 0 0-.02 1.41l.02.02 7.65 7.65c.29.29.68.44 1.06.44s.77-.15 1.06-.44l7.65-7.65a.996.996 0 0 0 0-1.41Z" |
| 593 |
/> |
| 594 |
</svg> |
| 595 |
</span> |
| 596 |
</button> |
| 597 |
</h3> |
| 598 |
<div class="pf-v6-c-accordion__expandable-content" hidden> |
| 599 |
<div |
| 600 |
class="pf-v6-c-accordion__expandable-content-body" |
| 601 |
>This text is hidden</div> |
| 602 |
</div> |
| 603 |
</div> |
| 604 |
|
| 605 |
<div class="pf-v6-c-accordion__item"> |
| 606 |
<h3> |
| 607 |
<button |
| 608 |
class="pf-v6-c-accordion__toggle" |
| 609 |
type="button" |
| 610 |
aria-expanded="false" |
| 611 |
> |
| 612 |
<span class="pf-v6-c-accordion__toggle-text">Item three</span> |
| 613 |
|
| 614 |
<span class="pf-v6-c-accordion__toggle-icon"> |
| 615 |
<svg |
| 616 |
class="pf-v6-svg" |
| 617 |
fill="currentColor" |
| 618 |
viewBox="0 0 20 20" |
| 619 |
aria-hidden="true" |
| 620 |
role="img" |
| 621 |
width="1em" |
| 622 |
height="1em" |
| 623 |
> |
| 624 |
<path |
| 625 |
d="M18.71 5.29a.996.996 0 0 0-1.41 0l-7.29 7.29-7.3-7.29a.987.987 0 0 0-1.41-.02.987.987 0 0 0-.02 1.41l.02.02 7.65 7.65c.29.29.68.44 1.06.44s.77-.15 1.06-.44l7.65-7.65a.996.996 0 0 0 0-1.41Z" |
| 626 |
/> |
| 627 |
</svg> |
| 628 |
</span> |
| 629 |
</button> |
| 630 |
</h3> |
| 631 |
<div class="pf-v6-c-accordion__expandable-content" hidden> |
| 632 |
<div |
| 633 |
class="pf-v6-c-accordion__expandable-content-body" |
| 634 |
>This text is hidden</div> |
| 635 |
</div> |
| 636 |
</div> |
| 637 |
|
| 638 |
<div class="pf-v6-c-accordion__item pf-m-expanded"> |
| 639 |
<h3> |
| 640 |
<button |
| 641 |
class="pf-v6-c-accordion__toggle" |
| 642 |
type="button" |
| 643 |
aria-expanded="true" |
| 644 |
> |
| 645 |
<span class="pf-v6-c-accordion__toggle-text">Item four</span> |
| 646 |
|
| 647 |
<span class="pf-v6-c-accordion__toggle-icon"> |
| 648 |
<svg |
| 649 |
class="pf-v6-svg" |
| 650 |
fill="currentColor" |
| 651 |
viewBox="0 0 20 20" |
| 652 |
aria-hidden="true" |
| 653 |
role="img" |
| 654 |
width="1em" |
| 655 |
height="1em" |
| 656 |
> |
| 657 |
<path |
| 658 |
d="M18.71 5.29a.996.996 0 0 0-1.41 0l-7.29 7.29-7.3-7.29a.987.987 0 0 0-1.41-.02.987.987 0 0 0-.02 1.41l.02.02 7.65 7.65c.29.29.68.44 1.06.44s.77-.15 1.06-.44l7.65-7.65a.996.996 0 0 0 0-1.41Z" |
| 659 |
/> |
| 660 |
</svg> |
| 661 |
</span> |
| 662 |
</button> |
| 663 |
</h3> |
| 664 |
<div class="pf-v6-c-accordion__expandable-content"> |
| 665 |
<div |
| 666 |
class="pf-v6-c-accordion__expandable-content-body" |
| 667 |
>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis molestie lorem lacinia dolor aliquet faucibus. Suspendisse gravida imperdiet accumsan. Aenean auctor lorem justo, vitae tincidunt enim blandit vel. Aenean quis tempus dolor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.</div> |
| 668 |
</div> |
| 669 |
</div> |
| 670 |
|
| 671 |
<div class="pf-v6-c-accordion__item"> |
| 672 |
<h3> |
| 673 |
<button |
| 674 |
class="pf-v6-c-accordion__toggle" |
| 675 |
type="button" |
| 676 |
aria-expanded="false" |
| 677 |
> |
| 678 |
<span class="pf-v6-c-accordion__toggle-text">Item five</span> |
| 679 |
|
| 680 |
<span class="pf-v6-c-accordion__toggle-icon"> |
| 681 |
<svg |
| 682 |
class="pf-v6-svg" |
| 683 |
fill="currentColor" |
| 684 |
viewBox="0 0 20 20" |
| 685 |
aria-hidden="true" |
| 686 |
role="img" |
| 687 |
width="1em" |
| 688 |
height="1em" |
| 689 |
> |
| 690 |
<path |
| 691 |
d="M18.71 5.29a.996.996 0 0 0-1.41 0l-7.29 7.29-7.3-7.29a.987.987 0 0 0-1.41-.02.987.987 0 0 0-.02 1.41l.02.02 7.65 7.65c.29.29.68.44 1.06.44s.77-.15 1.06-.44l7.65-7.65a.996.996 0 0 0 0-1.41Z" |
| 692 |
/> |
| 693 |
</svg> |
| 694 |
</span> |
| 695 |
</button> |
| 696 |
</h3> |
| 697 |
<div class="pf-v6-c-accordion__expandable-content" hidden> |
| 698 |
<div |
| 699 |
class="pf-v6-c-accordion__expandable-content-body" |
| 700 |
>This text is hidden</div> |
| 701 |
</div> |
| 702 |
</div> |
| 703 |
</div> |
| 704 |
|
| 705 |
``` |
| 706 |
|
| 707 |
### Large bordered |
| 708 |
|
| 709 |
```html |
| 710 |
<div class="pf-v6-c-accordion pf-m-display-lg pf-m-bordered"> |
| 711 |
<div class="pf-v6-c-accordion__item"> |
| 712 |
<h3> |
| 713 |
<button |
| 714 |
class="pf-v6-c-accordion__toggle" |
| 715 |
type="button" |
| 716 |
aria-expanded="false" |
| 717 |
> |
| 718 |
<span class="pf-v6-c-accordion__toggle-text">Item one</span> |
| 719 |
|
| 720 |
<span class="pf-v6-c-accordion__toggle-icon"> |
| 721 |
<svg |
| 722 |
class="pf-v6-svg" |
| 723 |
fill="currentColor" |
| 724 |
viewBox="0 0 20 20" |
| 725 |
aria-hidden="true" |
| 726 |
role="img" |
| 727 |
width="1em" |
| 728 |
height="1em" |
| 729 |
> |
| 730 |
<path |
| 731 |
d="M18.71 5.29a.996.996 0 0 0-1.41 0l-7.29 7.29-7.3-7.29a.987.987 0 0 0-1.41-.02.987.987 0 0 0-.02 1.41l.02.02 7.65 7.65c.29.29.68.44 1.06.44s.77-.15 1.06-.44l7.65-7.65a.996.996 0 0 0 0-1.41Z" |
| 732 |
/> |
| 733 |
</svg> |
| 734 |
</span> |
| 735 |
</button> |
| 736 |
</h3> |
| 737 |
<div class="pf-v6-c-accordion__expandable-content" hidden> |
| 738 |
<div |
| 739 |
class="pf-v6-c-accordion__expandable-content-body" |
| 740 |
>This text is hidden</div> |
| 741 |
</div> |
| 742 |
</div> |
| 743 |
|
| 744 |
<div class="pf-v6-c-accordion__item"> |
| 745 |
<h3> |
| 746 |
<button |
| 747 |
class="pf-v6-c-accordion__toggle" |
| 748 |
type="button" |
| 749 |
aria-expanded="false" |
| 750 |
> |
| 751 |
<span class="pf-v6-c-accordion__toggle-text">Item two</span> |
| 752 |
|
| 753 |
<span class="pf-v6-c-accordion__toggle-icon"> |
| 754 |
<svg |
| 755 |
class="pf-v6-svg" |
| 756 |
fill="currentColor" |
| 757 |
viewBox="0 0 20 20" |
| 758 |
aria-hidden="true" |
| 759 |
role="img" |
| 760 |
width="1em" |
| 761 |
height="1em" |
| 762 |
> |
| 763 |
<path |
| 764 |
d="M18.71 5.29a.996.996 0 0 0-1.41 0l-7.29 7.29-7.3-7.29a.987.987 0 0 0-1.41-.02.987.987 0 0 0-.02 1.41l.02.02 7.65 7.65c.29.29.68.44 1.06.44s.77-.15 1.06-.44l7.65-7.65a.996.996 0 0 0 0-1.41Z" |
| 765 |
/> |
| 766 |
</svg> |
| 767 |
</span> |
| 768 |
</button> |
| 769 |
</h3> |
| 770 |
<div class="pf-v6-c-accordion__expandable-content" hidden> |
| 771 |
<div |
| 772 |
class="pf-v6-c-accordion__expandable-content-body" |
| 773 |
>This text is hidden</div> |
| 774 |
</div> |
| 775 |
</div> |
| 776 |
|
| 777 |
<div class="pf-v6-c-accordion__item"> |
| 778 |
<h3> |
| 779 |
<button |
| 780 |
class="pf-v6-c-accordion__toggle" |
| 781 |
type="button" |
| 782 |
aria-expanded="false" |
| 783 |
> |
| 784 |
<span class="pf-v6-c-accordion__toggle-text">Item three</span> |
| 785 |
|
| 786 |
<span class="pf-v6-c-accordion__toggle-icon"> |
| 787 |
<svg |
| 788 |
class="pf-v6-svg" |
| 789 |
fill="currentColor" |
| 790 |
viewBox="0 0 20 20" |
| 791 |
aria-hidden="true" |
| 792 |
role="img" |
| 793 |
width="1em" |
| 794 |
height="1em" |
| 795 |
> |
| 796 |
<path |
| 797 |
d="M18.71 5.29a.996.996 0 0 0-1.41 0l-7.29 7.29-7.3-7.29a.987.987 0 0 0-1.41-.02.987.987 0 0 0-.02 1.41l.02.02 7.65 7.65c.29.29.68.44 1.06.44s.77-.15 1.06-.44l7.65-7.65a.996.996 0 0 0 0-1.41Z" |
| 798 |
/> |
| 799 |
</svg> |
| 800 |
</span> |
| 801 |
</button> |
| 802 |
</h3> |
| 803 |
<div class="pf-v6-c-accordion__expandable-content" hidden> |
| 804 |
<div |
| 805 |
class="pf-v6-c-accordion__expandable-content-body" |
| 806 |
>This text is hidden</div> |
| 807 |
</div> |
| 808 |
</div> |
| 809 |
|
| 810 |
<div class="pf-v6-c-accordion__item pf-m-expanded"> |
| 811 |
<h3> |
| 812 |
<button |
| 813 |
class="pf-v6-c-accordion__toggle" |
| 814 |
type="button" |
| 815 |
aria-expanded="true" |
| 816 |
> |
| 817 |
<span class="pf-v6-c-accordion__toggle-text">Item four</span> |
| 818 |
|
| 819 |
<span class="pf-v6-c-accordion__toggle-icon"> |
| 820 |
<svg |
| 821 |
class="pf-v6-svg" |
| 822 |
fill="currentColor" |
| 823 |
viewBox="0 0 20 20" |
| 824 |
aria-hidden="true" |
| 825 |
role="img" |
| 826 |
width="1em" |
| 827 |
height="1em" |
| 828 |
> |
| 829 |
<path |
| 830 |
d="M18.71 5.29a.996.996 0 0 0-1.41 0l-7.29 7.29-7.3-7.29a.987.987 0 0 0-1.41-.02.987.987 0 0 0-.02 1.41l.02.02 7.65 7.65c.29.29.68.44 1.06.44s.77-.15 1.06-.44l7.65-7.65a.996.996 0 0 0 0-1.41Z" |
| 831 |
/> |
| 832 |
</svg> |
| 833 |
</span> |
| 834 |
</button> |
| 835 |
</h3> |
| 836 |
<div class="pf-v6-c-accordion__expandable-content"> |
| 837 |
<div |
| 838 |
class="pf-v6-c-accordion__expandable-content-body" |
| 839 |
>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis molestie lorem lacinia dolor aliquet faucibus. Suspendisse gravida imperdiet accumsan. Aenean auctor lorem justo, vitae tincidunt enim blandit vel. Aenean quis tempus dolor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.</div> |
| 840 |
</div> |
| 841 |
</div> |
| 842 |
|
| 843 |
<div class="pf-v6-c-accordion__item"> |
| 844 |
<h3> |
| 845 |
<button |
| 846 |
class="pf-v6-c-accordion__toggle" |
| 847 |
type="button" |
| 848 |
aria-expanded="false" |
| 849 |
> |
| 850 |
<span class="pf-v6-c-accordion__toggle-text">Item five</span> |
| 851 |
|
| 852 |
<span class="pf-v6-c-accordion__toggle-icon"> |
| 853 |
<svg |
| 854 |
class="pf-v6-svg" |
| 855 |
fill="currentColor" |
| 856 |
viewBox="0 0 20 20" |
| 857 |
aria-hidden="true" |
| 858 |
role="img" |
| 859 |
width="1em" |
| 860 |
height="1em" |
| 861 |
> |
| 862 |
<path |
| 863 |
d="M18.71 5.29a.996.996 0 0 0-1.41 0l-7.29 7.29-7.3-7.29a.987.987 0 0 0-1.41-.02.987.987 0 0 0-.02 1.41l.02.02 7.65 7.65c.29.29.68.44 1.06.44s.77-.15 1.06-.44l7.65-7.65a.996.996 0 0 0 0-1.41Z" |
| 864 |
/> |
| 865 |
</svg> |
| 866 |
</span> |
| 867 |
</button> |
| 868 |
</h3> |
| 869 |
<div class="pf-v6-c-accordion__expandable-content" hidden> |
| 870 |
<div |
| 871 |
class="pf-v6-c-accordion__expandable-content-body" |
| 872 |
>This text is hidden</div> |
| 873 |
</div> |
| 874 |
</div> |
| 875 |
</div> |
| 876 |
|
| 877 |
``` |
| 878 |
|
| 879 |
### Toggle icon at start |
| 880 |
|
| 881 |
```html |
| 882 |
<div class="pf-v6-c-accordion pf-m-toggle-start"> |
| 883 |
<div class="pf-v6-c-accordion__item"> |
| 884 |
<h3> |
| 885 |
<button |
| 886 |
class="pf-v6-c-accordion__toggle" |
| 887 |
type="button" |
| 888 |
aria-expanded="false" |
| 889 |
> |
| 890 |
<span class="pf-v6-c-accordion__toggle-icon"> |
| 891 |
<svg |
| 892 |
class="pf-v6-svg" |
| 893 |
fill="currentColor" |
| 894 |
viewBox="0 0 20 20" |
| 895 |
aria-hidden="true" |
| 896 |
role="img" |
| 897 |
width="1em" |
| 898 |
height="1em" |
| 899 |
> |
| 900 |
<path |
| 901 |
d="M18.71 5.29a.996.996 0 0 0-1.41 0l-7.29 7.29-7.3-7.29a.987.987 0 0 0-1.41-.02.987.987 0 0 0-.02 1.41l.02.02 7.65 7.65c.29.29.68.44 1.06.44s.77-.15 1.06-.44l7.65-7.65a.996.996 0 0 0 0-1.41Z" |
| 902 |
/> |
| 903 |
</svg> |
| 904 |
</span> |
| 905 |
|
| 906 |
<span class="pf-v6-c-accordion__toggle-text">Item one</span> |
| 907 |
</button> |
| 908 |
</h3> |
| 909 |
<div class="pf-v6-c-accordion__expandable-content" hidden> |
| 910 |
<div |
| 911 |
class="pf-v6-c-accordion__expandable-content-body" |
| 912 |
>This text is hidden</div> |
| 913 |
</div> |
| 914 |
</div> |
| 915 |
|
| 916 |
<div class="pf-v6-c-accordion__item"> |
| 917 |
<h3> |
| 918 |
<button |
| 919 |
class="pf-v6-c-accordion__toggle" |
| 920 |
type="button" |
| 921 |
aria-expanded="false" |
| 922 |
> |
| 923 |
<span class="pf-v6-c-accordion__toggle-icon"> |
| 924 |
<svg |
| 925 |
class="pf-v6-svg" |
| 926 |
fill="currentColor" |
| 927 |
viewBox="0 0 20 20" |
| 928 |
aria-hidden="true" |
| 929 |
role="img" |
| 930 |
width="1em" |
| 931 |
height="1em" |
| 932 |
> |
| 933 |
<path |
| 934 |
d="M18.71 5.29a.996.996 0 0 0-1.41 0l-7.29 7.29-7.3-7.29a.987.987 0 0 0-1.41-.02.987.987 0 0 0-.02 1.41l.02.02 7.65 7.65c.29.29.68.44 1.06.44s.77-.15 1.06-.44l7.65-7.65a.996.996 0 0 0 0-1.41Z" |
| 935 |
/> |
| 936 |
</svg> |
| 937 |
</span> |
| 938 |
|
| 939 |
<span class="pf-v6-c-accordion__toggle-text">Item two</span> |
| 940 |
</button> |
| 941 |
</h3> |
| 942 |
<div class="pf-v6-c-accordion__expandable-content" hidden> |
| 943 |
<div |
| 944 |
class="pf-v6-c-accordion__expandable-content-body" |
| 945 |
>This text is hidden</div> |
| 946 |
</div> |
| 947 |
</div> |
| 948 |
|
| 949 |
<div class="pf-v6-c-accordion__item"> |
| 950 |
<h3> |
| 951 |
<button |
| 952 |
class="pf-v6-c-accordion__toggle" |
| 953 |
type="button" |
| 954 |
aria-expanded="false" |
| 955 |
> |
| 956 |
<span class="pf-v6-c-accordion__toggle-icon"> |
| 957 |
<svg |
| 958 |
class="pf-v6-svg" |
| 959 |
fill="currentColor" |
| 960 |
viewBox="0 0 20 20" |
| 961 |
aria-hidden="true" |
| 962 |
role="img" |
| 963 |
width="1em" |
| 964 |
height="1em" |
| 965 |
> |
| 966 |
<path |
| 967 |
d="M18.71 5.29a.996.996 0 0 0-1.41 0l-7.29 7.29-7.3-7.29a.987.987 0 0 0-1.41-.02.987.987 0 0 0-.02 1.41l.02.02 7.65 7.65c.29.29.68.44 1.06.44s.77-.15 1.06-.44l7.65-7.65a.996.996 0 0 0 0-1.41Z" |
| 968 |
/> |
| 969 |
</svg> |
| 970 |
</span> |
| 971 |
|
| 972 |
<span class="pf-v6-c-accordion__toggle-text">Item three</span> |
| 973 |
</button> |
| 974 |
</h3> |
| 975 |
<div class="pf-v6-c-accordion__expandable-content" hidden> |
| 976 |
<div |
| 977 |
class="pf-v6-c-accordion__expandable-content-body" |
| 978 |
>This text is hidden</div> |
| 979 |
</div> |
| 980 |
</div> |
| 981 |
|
| 982 |
<div class="pf-v6-c-accordion__item pf-m-expanded"> |
| 983 |
<h3> |
| 984 |
<button |
| 985 |
class="pf-v6-c-accordion__toggle" |
| 986 |
type="button" |
| 987 |
aria-expanded="true" |
| 988 |
> |
| 989 |
<span class="pf-v6-c-accordion__toggle-icon"> |
| 990 |
<svg |
| 991 |
class="pf-v6-svg" |
| 992 |
fill="currentColor" |
| 993 |
viewBox="0 0 20 20" |
| 994 |
aria-hidden="true" |
| 995 |
role="img" |
| 996 |
width="1em" |
| 997 |
height="1em" |
| 998 |
> |
| 999 |
<path |
| 1000 |
d="M18.71 5.29a.996.996 0 0 0-1.41 0l-7.29 7.29-7.3-7.29a.987.987 0 0 0-1.41-.02.987.987 0 0 0-.02 1.41l.02.02 7.65 7.65c.29.29.68.44 1.06.44s.77-.15 1.06-.44l7.65-7.65a.996.996 0 0 0 0-1.41Z" |
| 1001 |
/> |
| 1002 |
</svg> |
| 1003 |
</span> |
| 1004 |
|
| 1005 |
<span class="pf-v6-c-accordion__toggle-text">Item four</span> |
| 1006 |
</button> |
| 1007 |
</h3> |
| 1008 |
<div class="pf-v6-c-accordion__expandable-content"> |
| 1009 |
<div |
| 1010 |
class="pf-v6-c-accordion__expandable-content-body" |
| 1011 |
>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis molestie lorem lacinia dolor aliquet faucibus. Suspendisse gravida imperdiet accumsan. Aenean auctor lorem justo, vitae tincidunt enim blandit vel. Aenean quis tempus dolor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.</div> |
| 1012 |
</div> |
| 1013 |
</div> |
| 1014 |
|
| 1015 |
<div class="pf-v6-c-accordion__item"> |
| 1016 |
<h3> |
| 1017 |
<button |
| 1018 |
class="pf-v6-c-accordion__toggle" |
| 1019 |
type="button" |
| 1020 |
aria-expanded="false" |
| 1021 |
> |
| 1022 |
<span class="pf-v6-c-accordion__toggle-icon"> |
| 1023 |
<svg |
| 1024 |
class="pf-v6-svg" |
| 1025 |
fill="currentColor" |
| 1026 |
viewBox="0 0 20 20" |
| 1027 |
aria-hidden="true" |
| 1028 |
role="img" |
| 1029 |
width="1em" |
| 1030 |
height="1em" |
| 1031 |
> |
| 1032 |
<path |
| 1033 |
d="M18.71 5.29a.996.996 0 0 0-1.41 0l-7.29 7.29-7.3-7.29a.987.987 0 0 0-1.41-.02.987.987 0 0 0-.02 1.41l.02.02 7.65 7.65c.29.29.68.44 1.06.44s.77-.15 1.06-.44l7.65-7.65a.996.996 0 0 0 0-1.41Z" |
| 1034 |
/> |
| 1035 |
</svg> |
| 1036 |
</span> |
| 1037 |
|
| 1038 |
<span class="pf-v6-c-accordion__toggle-text">Item five</span> |
| 1039 |
</button> |
| 1040 |
</h3> |
| 1041 |
<div class="pf-v6-c-accordion__expandable-content" hidden> |
| 1042 |
<div |
| 1043 |
class="pf-v6-c-accordion__expandable-content-body" |
| 1044 |
>This text is hidden</div> |
| 1045 |
</div> |
| 1046 |
</div> |
| 1047 |
</div> |
| 1048 |
|
| 1049 |
``` |
| 1050 |
|
| 1051 |
## Documentation |
| 1052 |
|
| 1053 |
### Overview |
| 1054 |
|
| 1055 |
There are two variations to build the accordion component. The first is to use `<div>` and `<h1 - h6>` tags: |
| 1056 |
|
| 1057 |
* `.pf-v6-c-accordion` is placed on a `<div>`, |
| 1058 |
* `.pf-v6-c-accordion__toggle` is placed on a `<button>` that is inside a `<h1-h6>`, and |
| 1059 |
* `.pf-v6-c-accordion__expandable-content` is placed on a `<div>`. |
| 1060 |
|
| 1061 |
The heading level that you use should fit within the rest of the headings outlined on your page. |
| 1062 |
|
| 1063 |
Another variation is using the definition list: |
| 1064 |
|
| 1065 |
* `.pf-v6-c-accordion` is placed on a `<dl>`, |
| 1066 |
* `.pf-v6-c-accordion__toggle` is placed on a `<button>` that is inside a `<dt>`, and |
| 1067 |
* `.pf-v6-c-accordion__expandable-content` is placed on a `<dd>`. |
| 1068 |
|
| 1069 |
### Usage |
| 1070 |
|
| 1071 |
| Class | Applied to | Outcome | |
| 1072 |
| -- | -- | -- | |
| 1073 |
| `.pf-v6-c-accordion` | `<div>`, `<dl>` | Initiates an accordion component. **Required**| |
| 1074 |
| `.pf-v6-c-accordion__item` | `<div>` | Initiates an accordion item component. **Required**| |
| 1075 |
| `.pf-v6-c-accordion__toggle` | `<h1-h6><button>`, `<dt><button>` | Initiates a toggle in the accordion. **Required** | |
| 1076 |
| `.pf-v6-c-accordion__toggle-text` | `<span>` | Initiates the text inside the toggle. **Required** | |
| 1077 |
| `.pf-v6-c-accordion__toggle-icon` | `<span>` | Initiates the toggle icon wrapper. **Required** | |
| 1078 |
| `.pf-v6-c-accordion__expandable-content` | `<div>`, `<dd>` | Initiates expandable content. **Must be paired with a button** | |
| 1079 |
| `.pf-v6-c-accordion__expandable-content-body` | `<div>` | Initiates expandable content body. **Required** | |
| 1080 |
| `.pf-m-plain` | `.pf-v6-c-accordion` | Modifies the accordion have plain styles. | |
| 1081 |
| `.pf-m-no-plain-on-glass` | `.pf-v6-c-accordion` | Prevents the accordion from automatically applying plain styling when glass theme is enabled. | |
| 1082 |
| `.pf-m-bordered` | `.pf-v6-c-accordion` | Modifies the accordion to add borders between items. | |
| 1083 |
| `.pf-m-display-lg` | `.pf-v6-c-accordion` | Modifies the accordion for large display styling. This variation is for marketing/web use cases. | |
| 1084 |
| `.pf-m-toggle-start` | `.pf-v6-c-accordion` | Modifies accordion styling when accordion toggle icons are rendered at the start of the toggle, before the toggle text. | |
| 1085 |
| `.pf-m-expanded` | `.pf-v6-c-accordion__item` | Modifies the accordion item for the expanded state. | |
| 1086 |
| `.pf-m-fixed` | `.pf-v6-c-accordion__expandable-content` | Modifies the expandable content for the fixed state. | |