| 1 |
--- |
| 2 |
id: Inline edit |
| 3 |
section: components |
| 4 |
cssPrefix: pf-v6-c-inline-edit |
| 5 |
---## Introduction |
| 6 |
|
| 7 |
**Inline edit** is a utilitarian component that has two core elements, `.pf-v6-c-inline-edit__value` and `.pf-v6-c-inline-edit__input` and is based on a simple concept. When **value** is visible, **input** is hidden, and vice versa. |
| 8 |
|
| 9 |
### Generic groups |
| 10 |
|
| 11 |
`.pf-v6-c-inline-edit__group`s provide basic layout support and have several available modifiers (`.pf-m-action-group`, `.pf-m-icon-group`). |
| 12 |
|
| 13 |
### Actions |
| 14 |
|
| 15 |
**Actions** (`.pf-v6-c-inline-edit__action`) are hidden by default and exposed when a region of `.pf-v6-c-inline-edit` becomes active. The default visibility of an **action** or **action group** can be inversed by adding `.pf-m-enable-editable`. `.pf-m-enable-editable` flags an element or group of elements as the controlling agents for enabling editable content and therefore is visible by default and hidden when inline editing is enabled. |
| 16 |
|
| 17 |
## Examples |
| 18 |
|
| 19 |
Inline edit **toggle** can be placed anywhere within `.pf-v6-c-inline-edit`. It initiates the editability of elements. When an element becomes editable, **toggle** is hidden. |
| 20 |
|
| 21 |
### Inline edit toggle |
| 22 |
|
| 23 |
```html |
| 24 |
<div class="pf-v6-c-inline-edit" id="inline-edit-toggle-example"> |
| 25 |
<div class="pf-v6-c-inline-edit__action pf-m-enable-editable"> |
| 26 |
<button |
| 27 |
class="pf-v6-c-button pf-m-plain" |
| 28 |
type="button" |
| 29 |
id="inline-edit-toggle-example-edit-button" |
| 30 |
aria-label="Edit" |
| 31 |
aria-labelledby="inline-edit-toggle-example-edit-button inline-edit-toggle-example-label" |
| 32 |
> |
| 33 |
<span class="pf-v6-c-button__icon"> |
| 34 |
<svg |
| 35 |
class="pf-v6-svg" |
| 36 |
fill="currentColor" |
| 37 |
viewBox="0 0 512 512" |
| 38 |
aria-hidden="true" |
| 39 |
role="img" |
| 40 |
width="1em" |
| 41 |
height="1em" |
| 42 |
> |
| 43 |
<path |
| 44 |
d="M497.9 142.1l-46.1 46.1c-4.7 4.7-12.3 4.7-17 0l-111-111c-4.7-4.7-4.7-12.3 0-17l46.1-46.1c18.7-18.7 49.1-18.7 67.9 0l60.1 60.1c18.8 18.7 18.8 49.1 0 67.9zM284.2 99.8L21.6 362.4.4 483.9c-2.9 16.4 11.4 30.6 27.8 27.8l121.5-21.3 262.6-262.6c4.7-4.7 4.7-12.3 0-17l-111-111c-4.8-4.7-12.4-4.7-17.1 0zM124.1 339.9c-5.5-5.5-5.5-14.3 0-19.8l154-154c5.5-5.5 14.3-5.5 19.8 0s5.5 14.3 0 19.8l-154 154c-5.5 5.5-14.3 5.5-19.8 0zM88 424h48v36.3l-64.5 11.3-31.1-31.1L51.7 376H88v48z" |
| 45 |
/> |
| 46 |
</svg> |
| 47 |
</span> |
| 48 |
</button> |
| 49 |
</div> |
| 50 |
</div> |
| 51 |
|
| 52 |
``` |
| 53 |
|
| 54 |
Inline edit **value** can be placed anywhere within `.pf-v6-c-inline-edit`. It is visible by default and hidden when inline edit becomes **editable**. |
| 55 |
|
| 56 |
### Inline edit value |
| 57 |
|
| 58 |
```html |
| 59 |
<div class="pf-v6-c-inline-edit" id="inline-edit-value-example"> |
| 60 |
<div class="pf-v6-c-inline-edit__value">Static value</div> |
| 61 |
</div> |
| 62 |
|
| 63 |
``` |
| 64 |
|
| 65 |
Inline edit **action-group** contains save and cancel actions and is only visible when inline edit is **editable**. |
| 66 |
|
| 67 |
### Inline edit action group |
| 68 |
|
| 69 |
```html |
| 70 |
<div |
| 71 |
class="pf-v6-c-inline-edit pf-m-inline-editable" |
| 72 |
id="inline-edit-action-group-example" |
| 73 |
> |
| 74 |
<div class="pf-v6-c-inline-edit__group pf-m-action-group"> |
| 75 |
<div class="pf-v6-c-inline-edit__action"> |
| 76 |
<button class="pf-v6-c-button pf-m-primary" type="button"> |
| 77 |
<span class="pf-v6-c-button__text">Save</span> |
| 78 |
</button> |
| 79 |
</div> |
| 80 |
<div class="pf-v6-c-inline-edit__action"> |
| 81 |
<button class="pf-v6-c-button pf-m-secondary" type="button"> |
| 82 |
<span class="pf-v6-c-button__text">Cancel</span> |
| 83 |
</button> |
| 84 |
</div> |
| 85 |
</div> |
| 86 |
</div> |
| 87 |
|
| 88 |
``` |
| 89 |
|
| 90 |
### Inline edit action group icon buttons |
| 91 |
|
| 92 |
```html |
| 93 |
<div |
| 94 |
class="pf-v6-c-inline-edit pf-m-inline-editable" |
| 95 |
id="inline-edit-action-group-icon-buttons-example" |
| 96 |
> |
| 97 |
<div class="pf-v6-c-inline-edit__group pf-m-action-group pf-m-icon-group"> |
| 98 |
<div class="pf-v6-c-inline-edit__action pf-m-valid"> |
| 99 |
<button |
| 100 |
class="pf-v6-c-button pf-m-plain" |
| 101 |
type="button" |
| 102 |
aria-label="Save edits" |
| 103 |
> |
| 104 |
<span class="pf-v6-c-button__icon"> |
| 105 |
<svg |
| 106 |
class="pf-v6-svg" |
| 107 |
fill="currentColor" |
| 108 |
viewBox="0 0 512 512" |
| 109 |
aria-hidden="true" |
| 110 |
role="img" |
| 111 |
width="1em" |
| 112 |
height="1em" |
| 113 |
> |
| 114 |
<path |
| 115 |
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" |
| 116 |
/> |
| 117 |
</svg> |
| 118 |
</span> |
| 119 |
</button> |
| 120 |
</div> |
| 121 |
<div class="pf-v6-c-inline-edit__action"> |
| 122 |
<button |
| 123 |
class="pf-v6-c-button pf-m-plain" |
| 124 |
type="button" |
| 125 |
aria-label="Cancel edits" |
| 126 |
> |
| 127 |
<span class="pf-v6-c-button__icon"> |
| 128 |
<svg |
| 129 |
class="pf-v6-svg" |
| 130 |
fill="currentColor" |
| 131 |
viewBox="0 0 20 20" |
| 132 |
aria-hidden="true" |
| 133 |
role="img" |
| 134 |
width="1em" |
| 135 |
height="1em" |
| 136 |
> |
| 137 |
<path |
| 138 |
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" |
| 139 |
/> |
| 140 |
</svg> |
| 141 |
</span> |
| 142 |
</button> |
| 143 |
</div> |
| 144 |
</div> |
| 145 |
</div> |
| 146 |
|
| 147 |
``` |
| 148 |
|
| 149 |
### Single inline edit (default) |
| 150 |
|
| 151 |
```html |
| 152 |
<form class="pf-v6-c-inline-edit" id="single-inline-edit-example"> |
| 153 |
<div class="pf-v6-c-inline-edit__group"> |
| 154 |
<div |
| 155 |
class="pf-v6-c-inline-edit__value" |
| 156 |
id="single-inline-edit-example-label" |
| 157 |
>Static value</div> |
| 158 |
<div class="pf-v6-c-inline-edit__action pf-m-enable-editable"> |
| 159 |
<button |
| 160 |
class="pf-v6-c-button pf-m-plain" |
| 161 |
type="button" |
| 162 |
id="single-inline-edit-example-edit-button" |
| 163 |
aria-label="Edit" |
| 164 |
aria-labelledby="single-inline-edit-example-edit-button single-inline-edit-example-label" |
| 165 |
> |
| 166 |
<span class="pf-v6-c-button__icon"> |
| 167 |
<svg |
| 168 |
class="pf-v6-svg" |
| 169 |
fill="currentColor" |
| 170 |
viewBox="0 0 512 512" |
| 171 |
aria-hidden="true" |
| 172 |
role="img" |
| 173 |
width="1em" |
| 174 |
height="1em" |
| 175 |
> |
| 176 |
<path |
| 177 |
d="M497.9 142.1l-46.1 46.1c-4.7 4.7-12.3 4.7-17 0l-111-111c-4.7-4.7-4.7-12.3 0-17l46.1-46.1c18.7-18.7 49.1-18.7 67.9 0l60.1 60.1c18.8 18.7 18.8 49.1 0 67.9zM284.2 99.8L21.6 362.4.4 483.9c-2.9 16.4 11.4 30.6 27.8 27.8l121.5-21.3 262.6-262.6c4.7-4.7 4.7-12.3 0-17l-111-111c-4.8-4.7-12.4-4.7-17.1 0zM124.1 339.9c-5.5-5.5-5.5-14.3 0-19.8l154-154c5.5-5.5 14.3-5.5 19.8 0s5.5 14.3 0 19.8l-154 154c-5.5 5.5-14.3 5.5-19.8 0zM88 424h48v36.3l-64.5 11.3-31.1-31.1L51.7 376H88v48z" |
| 178 |
/> |
| 179 |
</svg> |
| 180 |
</span> |
| 181 |
</button> |
| 182 |
</div> |
| 183 |
</div> |
| 184 |
<div class="pf-v6-c-inline-edit__group"> |
| 185 |
<div class="pf-v6-c-inline-edit__input"> |
| 186 |
<span class="pf-v6-c-form-control"> |
| 187 |
<input |
| 188 |
type="text" |
| 189 |
value="Static value" |
| 190 |
aria-label="Editable text input" |
| 191 |
/> |
| 192 |
</span> |
| 193 |
</div> |
| 194 |
<div class="pf-v6-c-inline-edit__group pf-m-action-group pf-m-icon-group"> |
| 195 |
<div class="pf-v6-c-inline-edit__action pf-m-valid"> |
| 196 |
<button |
| 197 |
class="pf-v6-c-button pf-m-plain" |
| 198 |
type="button" |
| 199 |
aria-label="Save edits" |
| 200 |
> |
| 201 |
<span class="pf-v6-c-button__icon"> |
| 202 |
<svg |
| 203 |
class="pf-v6-svg" |
| 204 |
fill="currentColor" |
| 205 |
viewBox="0 0 512 512" |
| 206 |
aria-hidden="true" |
| 207 |
role="img" |
| 208 |
width="1em" |
| 209 |
height="1em" |
| 210 |
> |
| 211 |
<path |
| 212 |
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" |
| 213 |
/> |
| 214 |
</svg> |
| 215 |
</span> |
| 216 |
</button> |
| 217 |
</div> |
| 218 |
<div class="pf-v6-c-inline-edit__action"> |
| 219 |
<button |
| 220 |
class="pf-v6-c-button pf-m-plain" |
| 221 |
type="button" |
| 222 |
aria-label="Cancel edits" |
| 223 |
> |
| 224 |
<span class="pf-v6-c-button__icon"> |
| 225 |
<svg |
| 226 |
class="pf-v6-svg" |
| 227 |
fill="currentColor" |
| 228 |
viewBox="0 0 20 20" |
| 229 |
aria-hidden="true" |
| 230 |
role="img" |
| 231 |
width="1em" |
| 232 |
height="1em" |
| 233 |
> |
| 234 |
<path |
| 235 |
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" |
| 236 |
/> |
| 237 |
</svg> |
| 238 |
</span> |
| 239 |
</button> |
| 240 |
</div> |
| 241 |
</div> |
| 242 |
</div> |
| 243 |
</form> |
| 244 |
|
| 245 |
``` |
| 246 |
|
| 247 |
### Single inline edit (active) |
| 248 |
|
| 249 |
```html |
| 250 |
<form |
| 251 |
class="pf-v6-c-inline-edit pf-m-inline-editable" |
| 252 |
id="single-editable-example" |
| 253 |
> |
| 254 |
<div class="pf-v6-c-inline-edit__group"> |
| 255 |
<div |
| 256 |
class="pf-v6-c-inline-edit__value" |
| 257 |
id="single-editable-example-label" |
| 258 |
>Static value</div> |
| 259 |
<div class="pf-v6-c-inline-edit__action pf-m-enable-editable"> |
| 260 |
<button |
| 261 |
class="pf-v6-c-button pf-m-plain" |
| 262 |
type="button" |
| 263 |
id="single-editable-example-edit-button" |
| 264 |
aria-label="Edit" |
| 265 |
aria-labelledby="single-editable-example-edit-button single-editable-example-label" |
| 266 |
> |
| 267 |
<span class="pf-v6-c-button__icon"> |
| 268 |
<svg |
| 269 |
class="pf-v6-svg" |
| 270 |
fill="currentColor" |
| 271 |
viewBox="0 0 512 512" |
| 272 |
aria-hidden="true" |
| 273 |
role="img" |
| 274 |
width="1em" |
| 275 |
height="1em" |
| 276 |
> |
| 277 |
<path |
| 278 |
d="M497.9 142.1l-46.1 46.1c-4.7 4.7-12.3 4.7-17 0l-111-111c-4.7-4.7-4.7-12.3 0-17l46.1-46.1c18.7-18.7 49.1-18.7 67.9 0l60.1 60.1c18.8 18.7 18.8 49.1 0 67.9zM284.2 99.8L21.6 362.4.4 483.9c-2.9 16.4 11.4 30.6 27.8 27.8l121.5-21.3 262.6-262.6c4.7-4.7 4.7-12.3 0-17l-111-111c-4.8-4.7-12.4-4.7-17.1 0zM124.1 339.9c-5.5-5.5-5.5-14.3 0-19.8l154-154c5.5-5.5 14.3-5.5 19.8 0s5.5 14.3 0 19.8l-154 154c-5.5 5.5-14.3 5.5-19.8 0zM88 424h48v36.3l-64.5 11.3-31.1-31.1L51.7 376H88v48z" |
| 279 |
/> |
| 280 |
</svg> |
| 281 |
</span> |
| 282 |
</button> |
| 283 |
</div> |
| 284 |
</div> |
| 285 |
<div class="pf-v6-c-inline-edit__group"> |
| 286 |
<div class="pf-v6-c-inline-edit__input"> |
| 287 |
<span class="pf-v6-c-form-control"> |
| 288 |
<input |
| 289 |
type="text" |
| 290 |
value="Static value" |
| 291 |
aria-label="Editable text input" |
| 292 |
/> |
| 293 |
</span> |
| 294 |
</div> |
| 295 |
<div class="pf-v6-c-inline-edit__group pf-m-action-group pf-m-icon-group"> |
| 296 |
<div class="pf-v6-c-inline-edit__action pf-m-valid"> |
| 297 |
<button |
| 298 |
class="pf-v6-c-button pf-m-plain" |
| 299 |
type="button" |
| 300 |
aria-label="Save edits" |
| 301 |
> |
| 302 |
<span class="pf-v6-c-button__icon"> |
| 303 |
<svg |
| 304 |
class="pf-v6-svg" |
| 305 |
fill="currentColor" |
| 306 |
viewBox="0 0 512 512" |
| 307 |
aria-hidden="true" |
| 308 |
role="img" |
| 309 |
width="1em" |
| 310 |
height="1em" |
| 311 |
> |
| 312 |
<path |
| 313 |
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" |
| 314 |
/> |
| 315 |
</svg> |
| 316 |
</span> |
| 317 |
</button> |
| 318 |
</div> |
| 319 |
<div class="pf-v6-c-inline-edit__action"> |
| 320 |
<button |
| 321 |
class="pf-v6-c-button pf-m-plain" |
| 322 |
type="button" |
| 323 |
aria-label="Cancel edits" |
| 324 |
> |
| 325 |
<span class="pf-v6-c-button__icon"> |
| 326 |
<svg |
| 327 |
class="pf-v6-svg" |
| 328 |
fill="currentColor" |
| 329 |
viewBox="0 0 20 20" |
| 330 |
aria-hidden="true" |
| 331 |
role="img" |
| 332 |
width="1em" |
| 333 |
height="1em" |
| 334 |
> |
| 335 |
<path |
| 336 |
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" |
| 337 |
/> |
| 338 |
</svg> |
| 339 |
</span> |
| 340 |
</button> |
| 341 |
</div> |
| 342 |
</div> |
| 343 |
</div> |
| 344 |
</form> |
| 345 |
|
| 346 |
``` |
| 347 |
|
| 348 |
### Free form edit |
| 349 |
|
| 350 |
```html |
| 351 |
<div class="pf-v6-c-inline-edit" id="free-form-edit-example"> |
| 352 |
<div |
| 353 |
class="pf-v6-c-inline-edit__editable-text" |
| 354 |
role="textbox" |
| 355 |
id="free-form-edit-example-text" |
| 356 |
aria-label="Editable text" |
| 357 |
>Free form text</div> |
| 358 |
</div> |
| 359 |
|
| 360 |
``` |
| 361 |
|
| 362 |
### Single inline edit with label (default) |
| 363 |
|
| 364 |
```html |
| 365 |
<form class="pf-v6-c-inline-edit" id="single-inline-edit-with-label-example"> |
| 366 |
<div class="pf-v6-c-inline-edit__group"> |
| 367 |
<label |
| 368 |
class="pf-v6-c-inline-edit__label" |
| 369 |
id="single-inline-edit-with-label-example-label" |
| 370 |
for="single-inline-edit-with-label-example-input" |
| 371 |
>Single inline edit group</label> |
| 372 |
<div class="pf-v6-c-inline-edit__action pf-m-enable-editable"> |
| 373 |
<button |
| 374 |
class="pf-v6-c-button pf-m-plain" |
| 375 |
type="button" |
| 376 |
id="single-inline-edit-with-label-example-edit-button" |
| 377 |
aria-label="Edit" |
| 378 |
aria-labelledby="single-inline-edit-with-label-example-label single-inline-edit-with-label-example-edit-button" |
| 379 |
> |
| 380 |
<span class="pf-v6-c-button__icon"> |
| 381 |
<svg |
| 382 |
class="pf-v6-svg" |
| 383 |
fill="currentColor" |
| 384 |
viewBox="0 0 512 512" |
| 385 |
aria-hidden="true" |
| 386 |
role="img" |
| 387 |
width="1em" |
| 388 |
height="1em" |
| 389 |
> |
| 390 |
<path |
| 391 |
d="M497.9 142.1l-46.1 46.1c-4.7 4.7-12.3 4.7-17 0l-111-111c-4.7-4.7-4.7-12.3 0-17l46.1-46.1c18.7-18.7 49.1-18.7 67.9 0l60.1 60.1c18.8 18.7 18.8 49.1 0 67.9zM284.2 99.8L21.6 362.4.4 483.9c-2.9 16.4 11.4 30.6 27.8 27.8l121.5-21.3 262.6-262.6c4.7-4.7 4.7-12.3 0-17l-111-111c-4.8-4.7-12.4-4.7-17.1 0zM124.1 339.9c-5.5-5.5-5.5-14.3 0-19.8l154-154c5.5-5.5 14.3-5.5 19.8 0s5.5 14.3 0 19.8l-154 154c-5.5 5.5-14.3 5.5-19.8 0zM88 424h48v36.3l-64.5 11.3-31.1-31.1L51.7 376H88v48z" |
| 392 |
/> |
| 393 |
</svg> |
| 394 |
</span> |
| 395 |
</button> |
| 396 |
</div> |
| 397 |
</div> |
| 398 |
<div class="pf-v6-c-inline-edit__value">Static value</div> |
| 399 |
<div class="pf-v6-c-inline-edit__group"> |
| 400 |
<div class="pf-v6-c-inline-edit__input"> |
| 401 |
<span class="pf-v6-c-form-control"> |
| 402 |
<input |
| 403 |
type="text" |
| 404 |
id="single-inline-edit-with-label-example-input" |
| 405 |
value="Static value" |
| 406 |
aria-label="Editable text input" |
| 407 |
/> |
| 408 |
</span> |
| 409 |
</div> |
| 410 |
<div class="pf-v6-c-inline-edit__group pf-m-action-group pf-m-icon-group"> |
| 411 |
<div class="pf-v6-c-inline-edit__action pf-m-valid"> |
| 412 |
<button |
| 413 |
class="pf-v6-c-button pf-m-plain" |
| 414 |
type="button" |
| 415 |
aria-label="Save edits" |
| 416 |
> |
| 417 |
<span class="pf-v6-c-button__icon"> |
| 418 |
<svg |
| 419 |
class="pf-v6-svg" |
| 420 |
fill="currentColor" |
| 421 |
viewBox="0 0 512 512" |
| 422 |
aria-hidden="true" |
| 423 |
role="img" |
| 424 |
width="1em" |
| 425 |
height="1em" |
| 426 |
> |
| 427 |
<path |
| 428 |
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" |
| 429 |
/> |
| 430 |
</svg> |
| 431 |
</span> |
| 432 |
</button> |
| 433 |
</div> |
| 434 |
<div class="pf-v6-c-inline-edit__action"> |
| 435 |
<button |
| 436 |
class="pf-v6-c-button pf-m-plain" |
| 437 |
type="button" |
| 438 |
aria-label="Cancel edits" |
| 439 |
> |
| 440 |
<span class="pf-v6-c-button__icon"> |
| 441 |
<svg |
| 442 |
class="pf-v6-svg" |
| 443 |
fill="currentColor" |
| 444 |
viewBox="0 0 20 20" |
| 445 |
aria-hidden="true" |
| 446 |
role="img" |
| 447 |
width="1em" |
| 448 |
height="1em" |
| 449 |
> |
| 450 |
<path |
| 451 |
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" |
| 452 |
/> |
| 453 |
</svg> |
| 454 |
</span> |
| 455 |
</button> |
| 456 |
</div> |
| 457 |
</div> |
| 458 |
</div> |
| 459 |
</form> |
| 460 |
|
| 461 |
``` |
| 462 |
|
| 463 |
### State valid |
| 464 |
|
| 465 |
```html |
| 466 |
<div |
| 467 |
class="pf-v6-c-inline-edit pf-m-inline-editable" |
| 468 |
id="inline-edit-state-valid" |
| 469 |
> |
| 470 |
<div class="pf-v6-c-inline-edit__group"> |
| 471 |
<label |
| 472 |
class="pf-v6-c-inline-edit__label" |
| 473 |
id="inline-edit-state-valid-label" |
| 474 |
for="inline-edit-state-valid-input" |
| 475 |
>Valid example</label> |
| 476 |
<div class="pf-v6-c-inline-edit__action pf-m-enable-editable"> |
| 477 |
<button |
| 478 |
class="pf-v6-c-button pf-m-plain" |
| 479 |
type="button" |
| 480 |
id="inline-edit-state-valid-edit-button" |
| 481 |
aria-label="Edit" |
| 482 |
aria-labelledby="inline-edit-state-valid-label inline-edit-state-valid-edit-button" |
| 483 |
> |
| 484 |
<span class="pf-v6-c-button__icon"> |
| 485 |
<svg |
| 486 |
class="pf-v6-svg" |
| 487 |
fill="currentColor" |
| 488 |
viewBox="0 0 512 512" |
| 489 |
aria-hidden="true" |
| 490 |
role="img" |
| 491 |
width="1em" |
| 492 |
height="1em" |
| 493 |
> |
| 494 |
<path |
| 495 |
d="M497.9 142.1l-46.1 46.1c-4.7 4.7-12.3 4.7-17 0l-111-111c-4.7-4.7-4.7-12.3 0-17l46.1-46.1c18.7-18.7 49.1-18.7 67.9 0l60.1 60.1c18.8 18.7 18.8 49.1 0 67.9zM284.2 99.8L21.6 362.4.4 483.9c-2.9 16.4 11.4 30.6 27.8 27.8l121.5-21.3 262.6-262.6c4.7-4.7 4.7-12.3 0-17l-111-111c-4.8-4.7-12.4-4.7-17.1 0zM124.1 339.9c-5.5-5.5-5.5-14.3 0-19.8l154-154c5.5-5.5 14.3-5.5 19.8 0s5.5 14.3 0 19.8l-154 154c-5.5 5.5-14.3 5.5-19.8 0zM88 424h48v36.3l-64.5 11.3-31.1-31.1L51.7 376H88v48z" |
| 496 |
/> |
| 497 |
</svg> |
| 498 |
</span> |
| 499 |
</button> |
| 500 |
</div> |
| 501 |
</div> |
| 502 |
<div class="pf-v6-c-inline-edit__value">Static value</div> |
| 503 |
<div class="pf-v6-c-inline-edit__group"> |
| 504 |
<div class="pf-v6-c-inline-edit__input"> |
| 505 |
<span class="pf-v6-c-form-control"> |
| 506 |
<input |
| 507 |
type="text" |
| 508 |
value="Static value" |
| 509 |
aria-label="Editable text input" |
| 510 |
/> |
| 511 |
</span> |
| 512 |
</div> |
| 513 |
<div class="pf-v6-c-inline-edit__group pf-m-action-group pf-m-icon-group"> |
| 514 |
<div class="pf-v6-c-inline-edit__action pf-m-valid"> |
| 515 |
<button |
| 516 |
class="pf-v6-c-button pf-m-plain" |
| 517 |
type="button" |
| 518 |
aria-label="Save edits" |
| 519 |
> |
| 520 |
<span class="pf-v6-c-button__icon"> |
| 521 |
<svg |
| 522 |
class="pf-v6-svg" |
| 523 |
fill="currentColor" |
| 524 |
viewBox="0 0 512 512" |
| 525 |
aria-hidden="true" |
| 526 |
role="img" |
| 527 |
width="1em" |
| 528 |
height="1em" |
| 529 |
> |
| 530 |
<path |
| 531 |
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" |
| 532 |
/> |
| 533 |
</svg> |
| 534 |
</span> |
| 535 |
</button> |
| 536 |
</div> |
| 537 |
<div class="pf-v6-c-inline-edit__action"> |
| 538 |
<button |
| 539 |
class="pf-v6-c-button pf-m-plain" |
| 540 |
type="button" |
| 541 |
aria-label="Cancel edits" |
| 542 |
> |
| 543 |
<span class="pf-v6-c-button__icon"> |
| 544 |
<svg |
| 545 |
class="pf-v6-svg" |
| 546 |
fill="currentColor" |
| 547 |
viewBox="0 0 20 20" |
| 548 |
aria-hidden="true" |
| 549 |
role="img" |
| 550 |
width="1em" |
| 551 |
height="1em" |
| 552 |
> |
| 553 |
<path |
| 554 |
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" |
| 555 |
/> |
| 556 |
</svg> |
| 557 |
</span> |
| 558 |
</button> |
| 559 |
</div> |
| 560 |
</div> |
| 561 |
</div> |
| 562 |
</div> |
| 563 |
|
| 564 |
``` |
| 565 |
|
| 566 |
### State invalid |
| 567 |
|
| 568 |
```html |
| 569 |
<div |
| 570 |
class="pf-v6-c-inline-edit pf-m-inline-editable" |
| 571 |
id="inline-edit-state-invalid" |
| 572 |
> |
| 573 |
<div class="pf-v6-c-inline-edit__group"> |
| 574 |
<label |
| 575 |
class="pf-v6-c-inline-edit__label" |
| 576 |
id="inline-edit-state-invalid-label" |
| 577 |
for="inline-edit-state-invalid-input" |
| 578 |
>Invalid example</label> |
| 579 |
<div class="pf-v6-c-inline-edit__action pf-m-enable-editable"> |
| 580 |
<button |
| 581 |
class="pf-v6-c-button pf-m-plain" |
| 582 |
type="button" |
| 583 |
id="inline-edit-state-invalid-edit-button" |
| 584 |
aria-label="Edit" |
| 585 |
aria-labelledby="inline-edit-state-invalid-label inline-edit-state-invalid-edit-button" |
| 586 |
> |
| 587 |
<span class="pf-v6-c-button__icon"> |
| 588 |
<svg |
| 589 |
class="pf-v6-svg" |
| 590 |
fill="currentColor" |
| 591 |
viewBox="0 0 512 512" |
| 592 |
aria-hidden="true" |
| 593 |
role="img" |
| 594 |
width="1em" |
| 595 |
height="1em" |
| 596 |
> |
| 597 |
<path |
| 598 |
d="M497.9 142.1l-46.1 46.1c-4.7 4.7-12.3 4.7-17 0l-111-111c-4.7-4.7-4.7-12.3 0-17l46.1-46.1c18.7-18.7 49.1-18.7 67.9 0l60.1 60.1c18.8 18.7 18.8 49.1 0 67.9zM284.2 99.8L21.6 362.4.4 483.9c-2.9 16.4 11.4 30.6 27.8 27.8l121.5-21.3 262.6-262.6c4.7-4.7 4.7-12.3 0-17l-111-111c-4.8-4.7-12.4-4.7-17.1 0zM124.1 339.9c-5.5-5.5-5.5-14.3 0-19.8l154-154c5.5-5.5 14.3-5.5 19.8 0s5.5 14.3 0 19.8l-154 154c-5.5 5.5-14.3 5.5-19.8 0zM88 424h48v36.3l-64.5 11.3-31.1-31.1L51.7 376H88v48z" |
| 599 |
/> |
| 600 |
</svg> |
| 601 |
</span> |
| 602 |
</button> |
| 603 |
</div> |
| 604 |
</div> |
| 605 |
<div class="pf-v6-c-inline-edit__value">Static value</div> |
| 606 |
<div class="pf-v6-c-inline-edit__group"> |
| 607 |
<div class="pf-v6-c-inline-edit__input"> |
| 608 |
<span class="pf-v6-c-form-control pf-m-required pf-m-error"> |
| 609 |
<input |
| 610 |
required |
| 611 |
value="Invalid state" |
| 612 |
aria-invalid="true" |
| 613 |
aria-label="Error state input example" |
| 614 |
/> |
| 615 |
<span class="pf-v6-c-form-control__utilities"> |
| 616 |
<span class="pf-v6-c-form-control__icon pf-m-status"> |
| 617 |
<i class="fas fa-exclamation-circle" aria-hidden="true"></i> |
| 618 |
</span> |
| 619 |
</span> |
| 620 |
</span> |
| 621 |
</div> |
| 622 |
<div class="pf-v6-c-inline-edit__group pf-m-action-group pf-m-icon-group"> |
| 623 |
<div class="pf-v6-c-inline-edit__action"> |
| 624 |
<button |
| 625 |
class="pf-v6-c-button pf-m-plain" |
| 626 |
type="button" |
| 627 |
disabled |
| 628 |
aria-label="Save edits" |
| 629 |
> |
| 630 |
<span class="pf-v6-c-button__icon"> |
| 631 |
<svg |
| 632 |
class="pf-v6-svg" |
| 633 |
fill="currentColor" |
| 634 |
viewBox="0 0 512 512" |
| 635 |
aria-hidden="true" |
| 636 |
role="img" |
| 637 |
width="1em" |
| 638 |
height="1em" |
| 639 |
> |
| 640 |
<path |
| 641 |
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" |
| 642 |
/> |
| 643 |
</svg> |
| 644 |
</span> |
| 645 |
</button> |
| 646 |
</div> |
| 647 |
<div class="pf-v6-c-inline-edit__action"> |
| 648 |
<button |
| 649 |
class="pf-v6-c-button pf-m-plain" |
| 650 |
type="button" |
| 651 |
aria-label="Cancel edits" |
| 652 |
> |
| 653 |
<span class="pf-v6-c-button__icon"> |
| 654 |
<svg |
| 655 |
class="pf-v6-svg" |
| 656 |
fill="currentColor" |
| 657 |
viewBox="0 0 20 20" |
| 658 |
aria-hidden="true" |
| 659 |
role="img" |
| 660 |
width="1em" |
| 661 |
height="1em" |
| 662 |
> |
| 663 |
<path |
| 664 |
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" |
| 665 |
/> |
| 666 |
</svg> |
| 667 |
</span> |
| 668 |
</button> |
| 669 |
</div> |
| 670 |
</div> |
| 671 |
</div> |
| 672 |
</div> |
| 673 |
|
| 674 |
``` |
| 675 |
|
| 676 |
### Inline edit table row |
| 677 |
|
| 678 |
```html |
| 679 |
<form class="pf-v6-c-inline-edit" id="bulk-edit-table-example"> |
| 680 |
<table |
| 681 |
class="pf-v6-c-table pf-m-grid-lg" |
| 682 |
role="grid" |
| 683 |
aria-label="Inline edit table row example" |
| 684 |
id="inline-edit-table-row-example" |
| 685 |
> |
| 686 |
<caption class="pf-v6-c-table__caption">This is the table caption</caption> |
| 687 |
|
| 688 |
<thead class="pf-v6-c-table__thead"> |
| 689 |
<tr class="pf-v6-c-table__tr" role="row"> |
| 690 |
<th class="pf-v6-c-table__th" role="columnheader">Text input</th> |
| 691 |
|
| 692 |
<th class="pf-v6-c-table__th" role="columnheader">Disabled text input</th> |
| 693 |
|
| 694 |
<th class="pf-v6-c-table__th" role="columnheader">Checkboxes</th> |
| 695 |
|
| 696 |
<th class="pf-v6-c-table__th" role="columnheader">Radios</th> |
| 697 |
|
| 698 |
<th class="pf-v6-c-table__th" role="columnheader">Number</th> |
| 699 |
|
| 700 |
<th |
| 701 |
class="pf-v6-c-table__th pf-v6-c-table__cell-empty" |
| 702 |
role="columnheader" |
| 703 |
scope="col" |
| 704 |
> |
| 705 |
<span class="pf-v6-screen-reader">Actions</span> |
| 706 |
</th> |
| 707 |
|
| 708 |
<th |
| 709 |
class="pf-v6-c-table__th pf-v6-c-table__cell-empty" |
| 710 |
role="columnheader" |
| 711 |
scope="col" |
| 712 |
> |
| 713 |
<span class="pf-v6-screen-reader">Actions</span> |
| 714 |
</th> |
| 715 |
</tr> |
| 716 |
</thead> |
| 717 |
|
| 718 |
<tbody class="pf-v6-c-table__tbody" role="rowgroup"> |
| 719 |
<tr class="pf-v6-c-table__tr pf-m-inline-editable" role="row"> |
| 720 |
<th |
| 721 |
class="pf-v6-c-table__th" |
| 722 |
role="columnheader" |
| 723 |
data-label="Text input" |
| 724 |
> |
| 725 |
<div class="pf-v6-c-inline-edit__value">Text input description content</div> |
| 726 |
<div class="pf-v6-c-inline-edit__input"> |
| 727 |
<span class="pf-v6-c-form-control"> |
| 728 |
<input |
| 729 |
type="text" |
| 730 |
value="Text input description content" |
| 731 |
id="bulk-edit-table-example-row-1-text-input" |
| 732 |
aria-label="Text input for row 1" |
| 733 |
/> |
| 734 |
</span> |
| 735 |
</div> |
| 736 |
</th> |
| 737 |
|
| 738 |
<td |
| 739 |
class="pf-v6-c-table__td" |
| 740 |
role="cell" |
| 741 |
data-label="Disabled text input" |
| 742 |
> |
| 743 |
<div |
| 744 |
class="pf-v6-c-inline-edit__value" |
| 745 |
>Text input disabled, description content</div> |
| 746 |
<div class="pf-v6-c-inline-edit__input"> |
| 747 |
<span class="pf-v6-c-form-control pf-m-disabled"> |
| 748 |
<input |
| 749 |
disabled |
| 750 |
type="text" |
| 751 |
value="Text input disabled, description content" |
| 752 |
id="bulk-edit-table-example-row-1-text-input-disabled" |
| 753 |
aria-label="Disabled text input for row 1" |
| 754 |
/> |
| 755 |
</span> |
| 756 |
</div> |
| 757 |
</td> |
| 758 |
<td class="pf-v6-c-table__td" role="cell" data-label="Checkboxes"> |
| 759 |
<div class="pf-v6-c-inline-edit__value">Check 1, Check 2</div> |
| 760 |
<div |
| 761 |
class="pf-v6-c-inline-edit__group pf-m-column" |
| 762 |
role="group" |
| 763 |
aria-label="Checkbox group for row 1" |
| 764 |
> |
| 765 |
<div class="pf-v6-c-inline-edit__input"> |
| 766 |
<div class="pf-v6-c-check"> |
| 767 |
<input |
| 768 |
class="pf-v6-c-check__input" |
| 769 |
type="checkbox" |
| 770 |
id="bulk-edit-table-example-row-1-check-1" |
| 771 |
name="bulk-edit-table-example-row-1-example-check" |
| 772 |
/> |
| 773 |
|
| 774 |
<label |
| 775 |
class="pf-v6-c-check__label" |
| 776 |
for="bulk-edit-table-example-row-1-check-1" |
| 777 |
>Check 1</label> |
| 778 |
</div> |
| 779 |
</div> |
| 780 |
<div class="pf-v6-c-inline-edit__input"> |
| 781 |
<div class="pf-v6-c-check"> |
| 782 |
<input |
| 783 |
class="pf-v6-c-check__input" |
| 784 |
type="checkbox" |
| 785 |
id="bulk-edit-table-example-row-1-check-2" |
| 786 |
name="bulk-edit-table-example-row-1-example-check-2" |
| 787 |
/> |
| 788 |
|
| 789 |
<label |
| 790 |
class="pf-v6-c-check__label" |
| 791 |
for="bulk-edit-table-example-row-1-check-2" |
| 792 |
>Check 2</label> |
| 793 |
</div> |
| 794 |
</div> |
| 795 |
</div> |
| 796 |
</td> |
| 797 |
<td class="pf-v6-c-table__td" role="cell" data-label="Radios"> |
| 798 |
<div class="pf-v6-c-inline-edit__value">Radio 1, Radio 2</div> |
| 799 |
<div |
| 800 |
class="pf-v6-c-inline-edit__group pf-m-column" |
| 801 |
role="radiogroup" |
| 802 |
aria-label="Radio group for row 1" |
| 803 |
> |
| 804 |
<div class="pf-v6-c-inline-edit__input"> |
| 805 |
<div class="pf-v6-c-radio"> |
| 806 |
<input |
| 807 |
class="pf-v6-c-radio__input" |
| 808 |
type="radio" |
| 809 |
id="bulk-edit-table-example-row-1-radio-1" |
| 810 |
name="bulk-edit-table-example-row-1-example-radio" |
| 811 |
/> |
| 812 |
|
| 813 |
<label |
| 814 |
class="pf-v6-c-radio__label" |
| 815 |
for="bulk-edit-table-example-row-1-radio-1" |
| 816 |
>Radio 1</label> |
| 817 |
</div> |
| 818 |
</div> |
| 819 |
<div class="pf-v6-c-inline-edit__input"> |
| 820 |
<div class="pf-v6-c-radio"> |
| 821 |
<input |
| 822 |
class="pf-v6-c-radio__input" |
| 823 |
type="radio" |
| 824 |
id="bulk-edit-table-example-row-1-radio-2" |
| 825 |
name="bulk-edit-table-example-row-1-example-radio" |
| 826 |
/> |
| 827 |
|
| 828 |
<label |
| 829 |
class="pf-v6-c-radio__label" |
| 830 |
for="bulk-edit-table-example-row-1-radio-2" |
| 831 |
>Radio 2</label> |
| 832 |
</div> |
| 833 |
</div> |
| 834 |
</div> |
| 835 |
</td> |
| 836 |
<td class="pf-v6-c-table__td" role="cell" data-label="Number"> |
| 837 |
<div class="pf-v6-c-inline-edit__value">2</div> |
| 838 |
<div class="pf-v6-c-inline-edit__input"> |
| 839 |
<span class="pf-v6-c-form-control"> |
| 840 |
<input |
| 841 |
type="number" |
| 842 |
value="2" |
| 843 |
id="bulk-edit-table-example-row-1-number-input" |
| 844 |
aria-label="Number input for row 1" |
| 845 |
/> |
| 846 |
</span> |
| 847 |
</div> |
| 848 |
</td> |
| 849 |
<td |
| 850 |
class="pf-v6-c-table__td pf-v6-c-table__inline-edit-action" |
| 851 |
role="cell" |
| 852 |
> |
| 853 |
<div |
| 854 |
class="pf-v6-c-inline-edit__group pf-m-action-group pf-m-icon-group" |
| 855 |
> |
| 856 |
<div class="pf-v6-c-inline-edit__action pf-m-valid"> |
| 857 |
<button |
| 858 |
class="pf-v6-c-button pf-m-plain" |
| 859 |
type="button" |
| 860 |
aria-label="Save edits" |
| 861 |
> |
| 862 |
<span class="pf-v6-c-button__icon"> |
| 863 |
<svg |
| 864 |
class="pf-v6-svg" |
| 865 |
fill="currentColor" |
| 866 |
viewBox="0 0 512 512" |
| 867 |
aria-hidden="true" |
| 868 |
role="img" |
| 869 |
width="1em" |
| 870 |
height="1em" |
| 871 |
> |
| 872 |
<path |
| 873 |
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" |
| 874 |
/> |
| 875 |
</svg> |
| 876 |
</span> |
| 877 |
</button> |
| 878 |
</div> |
| 879 |
<div class="pf-v6-c-inline-edit__action"> |
| 880 |
<button |
| 881 |
class="pf-v6-c-button pf-m-plain" |
| 882 |
type="button" |
| 883 |
aria-label="Cancel edits" |
| 884 |
> |
| 885 |
<span class="pf-v6-c-button__icon"> |
| 886 |
<svg |
| 887 |
class="pf-v6-svg" |
| 888 |
fill="currentColor" |
| 889 |
viewBox="0 0 20 20" |
| 890 |
aria-hidden="true" |
| 891 |
role="img" |
| 892 |
width="1em" |
| 893 |
height="1em" |
| 894 |
> |
| 895 |
<path |
| 896 |
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" |
| 897 |
/> |
| 898 |
</svg> |
| 899 |
</span> |
| 900 |
</button> |
| 901 |
</div> |
| 902 |
</div> |
| 903 |
<div class="pf-v6-c-inline-edit__action pf-m-enable-editable"> |
| 904 |
<button |
| 905 |
class="pf-v6-c-button pf-m-plain" |
| 906 |
type="button" |
| 907 |
id="bulk-edit-table-example-row-1-edit-button" |
| 908 |
aria-label="Edit" |
| 909 |
aria-labelledby="bulk-edit-table-example-label bulk-edit-table-example-row-1-edit-button" |
| 910 |
> |
| 911 |
<span class="pf-v6-c-button__icon"> |
| 912 |
<svg |
| 913 |
class="pf-v6-svg" |
| 914 |
fill="currentColor" |
| 915 |
viewBox="0 0 512 512" |
| 916 |
aria-hidden="true" |
| 917 |
role="img" |
| 918 |
width="1em" |
| 919 |
height="1em" |
| 920 |
> |
| 921 |
<path |
| 922 |
d="M497.9 142.1l-46.1 46.1c-4.7 4.7-12.3 4.7-17 0l-111-111c-4.7-4.7-4.7-12.3 0-17l46.1-46.1c18.7-18.7 49.1-18.7 67.9 0l60.1 60.1c18.8 18.7 18.8 49.1 0 67.9zM284.2 99.8L21.6 362.4.4 483.9c-2.9 16.4 11.4 30.6 27.8 27.8l121.5-21.3 262.6-262.6c4.7-4.7 4.7-12.3 0-17l-111-111c-4.8-4.7-12.4-4.7-17.1 0zM124.1 339.9c-5.5-5.5-5.5-14.3 0-19.8l154-154c5.5-5.5 14.3-5.5 19.8 0s5.5 14.3 0 19.8l-154 154c-5.5 5.5-14.3 5.5-19.8 0zM88 424h48v36.3l-64.5 11.3-31.1-31.1L51.7 376H88v48z" |
| 923 |
/> |
| 924 |
</svg> |
| 925 |
</span> |
| 926 |
</button> |
| 927 |
</div> |
| 928 |
</td> |
| 929 |
|
| 930 |
<td class="pf-v6-c-table__td pf-v6-c-table__action"> |
| 931 |
<button |
| 932 |
class="pf-v6-c-menu-toggle pf-m-plain" |
| 933 |
type="button" |
| 934 |
aria-expanded="false" |
| 935 |
aria-label="Table actions" |
| 936 |
> |
| 937 |
<span class="pf-v6-c-menu-toggle__icon"> |
| 938 |
<svg |
| 939 |
class="pf-v6-svg" |
| 940 |
fill="currentColor" |
| 941 |
viewBox="0 0 32 32" |
| 942 |
aria-hidden="true" |
| 943 |
role="img" |
| 944 |
width="1em" |
| 945 |
height="1em" |
| 946 |
> |
| 947 |
<path |
| 948 |
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" |
| 949 |
/> |
| 950 |
</svg> |
| 951 |
</span> |
| 952 |
</button> |
| 953 |
</td> |
| 954 |
</tr> |
| 955 |
|
| 956 |
<tr class="pf-v6-c-table__tr" role="row"> |
| 957 |
<th |
| 958 |
class="pf-v6-c-table__th" |
| 959 |
role="columnheader" |
| 960 |
data-label="Text input" |
| 961 |
> |
| 962 |
<div class="pf-v6-c-inline-edit__value">Text input description content</div> |
| 963 |
<div class="pf-v6-c-inline-edit__input"> |
| 964 |
<span class="pf-v6-c-form-control"> |
| 965 |
<input |
| 966 |
type="text" |
| 967 |
value="Text input description content" |
| 968 |
id="bulk-edit-table-example-row-2-text-input" |
| 969 |
aria-label="Text input for row 2" |
| 970 |
/> |
| 971 |
</span> |
| 972 |
</div> |
| 973 |
</th> |
| 974 |
|
| 975 |
<td |
| 976 |
class="pf-v6-c-table__td" |
| 977 |
role="cell" |
| 978 |
data-label="Disabled text input" |
| 979 |
> |
| 980 |
<div |
| 981 |
class="pf-v6-c-inline-edit__value" |
| 982 |
>Text input disabled, description content</div> |
| 983 |
<div class="pf-v6-c-inline-edit__input"> |
| 984 |
<span class="pf-v6-c-form-control pf-m-disabled"> |
| 985 |
<input |
| 986 |
disabled |
| 987 |
type="text" |
| 988 |
value="Text input disabled, description content" |
| 989 |
id="bulk-edit-table-example-row-2-text-input-disabled" |
| 990 |
aria-label="Disabled text input for row 2" |
| 991 |
/> |
| 992 |
</span> |
| 993 |
</div> |
| 994 |
</td> |
| 995 |
<td class="pf-v6-c-table__td" role="cell" data-label="Checkboxes"> |
| 996 |
<div class="pf-v6-c-inline-edit__value">Check 1, Check 2</div> |
| 997 |
<div |
| 998 |
class="pf-v6-c-inline-edit__group pf-m-column" |
| 999 |
role="group" |
| 1000 |
aria-label="Checkbox group for row 2" |
| 1001 |
> |
| 1002 |
<div class="pf-v6-c-inline-edit__input"> |
| 1003 |
<div class="pf-v6-c-check"> |
| 1004 |
<input |
| 1005 |
class="pf-v6-c-check__input" |
| 1006 |
type="checkbox" |
| 1007 |
id="bulk-edit-table-example-row-2-check-1" |
| 1008 |
name="bulk-edit-table-example-row-2-example-check" |
| 1009 |
/> |
| 1010 |
|
| 1011 |
<label |
| 1012 |
class="pf-v6-c-check__label" |
| 1013 |
for="bulk-edit-table-example-row-2-check-1" |
| 1014 |
>Check 1</label> |
| 1015 |
</div> |
| 1016 |
</div> |
| 1017 |
<div class="pf-v6-c-inline-edit__input"> |
| 1018 |
<div class="pf-v6-c-check"> |
| 1019 |
<input |
| 1020 |
class="pf-v6-c-check__input" |
| 1021 |
type="checkbox" |
| 1022 |
id="bulk-edit-table-example-row-2-check-2" |
| 1023 |
name="bulk-edit-table-example-row-2-example-check-2" |
| 1024 |
/> |
| 1025 |
|
| 1026 |
<label |
| 1027 |
class="pf-v6-c-check__label" |
| 1028 |
for="bulk-edit-table-example-row-2-check-2" |
| 1029 |
>Check 2</label> |
| 1030 |
</div> |
| 1031 |
</div> |
| 1032 |
</div> |
| 1033 |
</td> |
| 1034 |
<td class="pf-v6-c-table__td" role="cell" data-label="Radios"> |
| 1035 |
<div class="pf-v6-c-inline-edit__value">Radio 1, Radio 2</div> |
| 1036 |
<div |
| 1037 |
class="pf-v6-c-inline-edit__group pf-m-column" |
| 1038 |
role="radiogroup" |
| 1039 |
aria-label="Radio group for row 2" |
| 1040 |
> |
| 1041 |
<div class="pf-v6-c-inline-edit__input"> |
| 1042 |
<div class="pf-v6-c-radio"> |
| 1043 |
<input |
| 1044 |
class="pf-v6-c-radio__input" |
| 1045 |
type="radio" |
| 1046 |
id="bulk-edit-table-example-row-2-radio-1" |
| 1047 |
name="bulk-edit-table-example-row-2-example-radio-1" |
| 1048 |
/> |
| 1049 |
|
| 1050 |
<label |
| 1051 |
class="pf-v6-c-radio__label" |
| 1052 |
for="bulk-edit-table-example-row-2-radio-1" |
| 1053 |
>Radio 1</label> |
| 1054 |
</div> |
| 1055 |
</div> |
| 1056 |
<div class="pf-v6-c-inline-edit__input"> |
| 1057 |
<div class="pf-v6-c-radio"> |
| 1058 |
<input |
| 1059 |
class="pf-v6-c-radio__input" |
| 1060 |
type="radio" |
| 1061 |
id="bulk-edit-table-example-row-2-radio-2" |
| 1062 |
name="bulk-edit-table-example-row-2-example-radio-2" |
| 1063 |
/> |
| 1064 |
|
| 1065 |
<label |
| 1066 |
class="pf-v6-c-radio__label" |
| 1067 |
for="bulk-edit-table-example-row-2-radio-2" |
| 1068 |
>Radio 2</label> |
| 1069 |
</div> |
| 1070 |
</div> |
| 1071 |
</div> |
| 1072 |
</td> |
| 1073 |
<td class="pf-v6-c-table__td" role="cell" data-label="Number"> |
| 1074 |
<div class="pf-v6-c-inline-edit__value">2</div> |
| 1075 |
<div class="pf-v6-c-inline-edit__input"> |
| 1076 |
<span class="pf-v6-c-form-control"> |
| 1077 |
<input |
| 1078 |
type="number" |
| 1079 |
value="2" |
| 1080 |
id="bulk-edit-table-example-row-2-number-input" |
| 1081 |
aria-label="Number input for row 2" |
| 1082 |
/> |
| 1083 |
</span> |
| 1084 |
</div> |
| 1085 |
</td> |
| 1086 |
<td |
| 1087 |
class="pf-v6-c-table__td pf-v6-c-table__inline-edit-action" |
| 1088 |
role="cell" |
| 1089 |
> |
| 1090 |
<div |
| 1091 |
class="pf-v6-c-inline-edit__group pf-m-action-group pf-m-icon-group" |
| 1092 |
> |
| 1093 |
<div class="pf-v6-c-inline-edit__action pf-m-valid"> |
| 1094 |
<button |
| 1095 |
class="pf-v6-c-button pf-m-plain" |
| 1096 |
type="button" |
| 1097 |
aria-label="Save edits" |
| 1098 |
> |
| 1099 |
<span class="pf-v6-c-button__icon"> |
| 1100 |
<svg |
| 1101 |
class="pf-v6-svg" |
| 1102 |
fill="currentColor" |
| 1103 |
viewBox="0 0 512 512" |
| 1104 |
aria-hidden="true" |
| 1105 |
role="img" |
| 1106 |
width="1em" |
| 1107 |
height="1em" |
| 1108 |
> |
| 1109 |
<path |
| 1110 |
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" |
| 1111 |
/> |
| 1112 |
</svg> |
| 1113 |
</span> |
| 1114 |
</button> |
| 1115 |
</div> |
| 1116 |
<div class="pf-v6-c-inline-edit__action"> |
| 1117 |
<button |
| 1118 |
class="pf-v6-c-button pf-m-plain" |
| 1119 |
type="button" |
| 1120 |
aria-label="Cancel edits" |
| 1121 |
> |
| 1122 |
<span class="pf-v6-c-button__icon"> |
| 1123 |
<svg |
| 1124 |
class="pf-v6-svg" |
| 1125 |
fill="currentColor" |
| 1126 |
viewBox="0 0 20 20" |
| 1127 |
aria-hidden="true" |
| 1128 |
role="img" |
| 1129 |
width="1em" |
| 1130 |
height="1em" |
| 1131 |
> |
| 1132 |
<path |
| 1133 |
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" |
| 1134 |
/> |
| 1135 |
</svg> |
| 1136 |
</span> |
| 1137 |
</button> |
| 1138 |
</div> |
| 1139 |
</div> |
| 1140 |
<div class="pf-v6-c-inline-edit__action pf-m-enable-editable"> |
| 1141 |
<button |
| 1142 |
class="pf-v6-c-button pf-m-plain" |
| 1143 |
type="button" |
| 1144 |
id="bulk-edit-table-example-row-2-edit-button" |
| 1145 |
aria-label="Edit" |
| 1146 |
aria-labelledby="bulk-edit-table-example-label bulk-edit-table-example-row-2-edit-button" |
| 1147 |
> |
| 1148 |
<span class="pf-v6-c-button__icon"> |
| 1149 |
<svg |
| 1150 |
class="pf-v6-svg" |
| 1151 |
fill="currentColor" |
| 1152 |
viewBox="0 0 512 512" |
| 1153 |
aria-hidden="true" |
| 1154 |
role="img" |
| 1155 |
width="1em" |
| 1156 |
height="1em" |
| 1157 |
> |
| 1158 |
<path |
| 1159 |
d="M497.9 142.1l-46.1 46.1c-4.7 4.7-12.3 4.7-17 0l-111-111c-4.7-4.7-4.7-12.3 0-17l46.1-46.1c18.7-18.7 49.1-18.7 67.9 0l60.1 60.1c18.8 18.7 18.8 49.1 0 67.9zM284.2 99.8L21.6 362.4.4 483.9c-2.9 16.4 11.4 30.6 27.8 27.8l121.5-21.3 262.6-262.6c4.7-4.7 4.7-12.3 0-17l-111-111c-4.8-4.7-12.4-4.7-17.1 0zM124.1 339.9c-5.5-5.5-5.5-14.3 0-19.8l154-154c5.5-5.5 14.3-5.5 19.8 0s5.5 14.3 0 19.8l-154 154c-5.5 5.5-14.3 5.5-19.8 0zM88 424h48v36.3l-64.5 11.3-31.1-31.1L51.7 376H88v48z" |
| 1160 |
/> |
| 1161 |
</svg> |
| 1162 |
</span> |
| 1163 |
</button> |
| 1164 |
</div> |
| 1165 |
</td> |
| 1166 |
|
| 1167 |
<td class="pf-v6-c-table__td pf-v6-c-table__action"> |
| 1168 |
<button |
| 1169 |
class="pf-v6-c-menu-toggle pf-m-plain" |
| 1170 |
type="button" |
| 1171 |
aria-expanded="false" |
| 1172 |
aria-label="Table actions" |
| 1173 |
> |
| 1174 |
<span class="pf-v6-c-menu-toggle__icon"> |
| 1175 |
<svg |
| 1176 |
class="pf-v6-svg" |
| 1177 |
fill="currentColor" |
| 1178 |
viewBox="0 0 32 32" |
| 1179 |
aria-hidden="true" |
| 1180 |
role="img" |
| 1181 |
width="1em" |
| 1182 |
height="1em" |
| 1183 |
> |
| 1184 |
<path |
| 1185 |
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" |
| 1186 |
/> |
| 1187 |
</svg> |
| 1188 |
</span> |
| 1189 |
</button> |
| 1190 |
</td> |
| 1191 |
</tr> |
| 1192 |
</tbody> |
| 1193 |
</table> |
| 1194 |
</form> |
| 1195 |
|
| 1196 |
``` |
| 1197 |
|
| 1198 |
## Documentation |
| 1199 |
|
| 1200 |
### Accessibility |
| 1201 |
|
| 1202 |
All accessibility requirements for inputs apply to elements within inline edit. |
| 1203 |
|
| 1204 |
| Attribute | Applied to | Outcome | |
| 1205 |
| -- | -- | -- | |
| 1206 |
| `id` | `[labelling element]` | Provides a reference for toggle button and/or editable content. | |
| 1207 |
| `aria-label="descriptive text"` | `.pf-v6-c-inline-edit__toggle > button` | Provides an accessible description for toggle button. **Required** | |
| 1208 |
| `aria-labelledby="[labelling element] [toggle button id]"` | `.pf-v6-c-inline-edit__toggle > button` | Provides an accessible description for toggle button. **Required** | |
| 1209 |
| `aria-label="descriptive text"` | `[radio button group]` | Provides an accessible description for radio groups. **Required** | |
| 1210 |
| `contenteditable="true"` | `.pf-v6-c-inline-edit__editable-text` | Ensures the text node is editable. | |
| 1211 |
| `role="textbox"` | `.pf-v6-c-inline-edit__editable-text` | Identifies an element that allows the input of free-form text. | |
| 1212 |
| `role="radiogroup"` | `[radio button group]` | Provides an accessible role for radio buttons groups. **Required** | |
| 1213 |
|
| 1214 |
### Usage |
| 1215 |
|
| 1216 |
| Class | Applied to | Outcome | |
| 1217 |
| -- | -- | -- | |
| 1218 |
| `.pf-v6-c-inline-edit` | `<form>`, `<div>` | Initiates the inline edit component. **Required** | |
| 1219 |
| `.pf-v6-c-inline-edit__value` | `*` | Initiates an inline edit value. **Required** | |
| 1220 |
| `.pf-v6-c-inline-edit__input` | `*` | Initiates an inline edit input. **Required** | |
| 1221 |
| `.pf-v6-c-inline-edit__editable-text` | `*` | Initiates an inline editable text element. | |
| 1222 |
| `.pf-v6-c-inline-edit__label` | `*` | Initiates an inline edit label. | |
| 1223 |
| `.pf-v6-c-inline-edit__action` | `*` | Initiates an inline edit action (visible when inline edit region is active). **Required** | |
| 1224 |
| `.pf-m-inline-editable` | `.pf-v6-c-inline-edit`, `.pf-v6-c-inline-edit [block level element]` | Modifies an inline edit region for editable state. | |
| 1225 |
| `.pf-m-action-group` | `.pf-v6-c-inline-edit__group` | Modifies group for action group. | |
| 1226 |
| `.pf-m-icon-group` | `.pf-v6-c-inline-edit__group` | Modifies an action group item spacing. | |
| 1227 |
| `.pf-m-column` | `.pf-v6-c-inline-edit__group` | Modifies an action group flex direction. | |
| 1228 |
| `.pf-m-footer` | `.pf-v6-c-inline-edit__group` | Modifies an inline edit group margin-top. | |
| 1229 |
| `.pf-m-bold` | `.pf-v6-c-inline-edit__label` | Modifies an inline edit label's `font-weight`. | |
| 1230 |
| `.pf-m-valid` | `.pf-v6-c-inline-edit__action` | Modifies the action button state. | |
| 1231 |
| `.pf-m-enable-editable` | `.pf-v6-c-inline-edit__action` | Exposes an inline edit action by default. | |