Debian Codegraph @

node/@patternfly/patternfly/docs/components/AboutModalBox/examples/AboutModalBox.md

raw
1 ---
2 id: About modal
3 section: components
4 cssPrefix: pf-v6-c-about-modal-box
5 ---## Examples
6
7 ### Basic
8
9 ```html isFullscreen
10 <div
11 class="pf-v6-c-about-modal-box"
12 style="--pf-v6-c-about-modal-box--BackgroundImage: url(/assets/images/pf-background.svg)"
13 >
14 <div class="pf-v6-c-about-modal-box__brand">
15 <img
16 class="pf-v6-c-about-modal-box__brand-image"
17 src="/assets/images/PF-IconLogo.svg"
18 alt="PatternFly brand logo"
19 />
20 </div>
21 <div class="pf-v6-c-about-modal-box__close">
22 <button
23 class="pf-v6-c-button pf-m-plain"
24 type="button"
25 aria-label="Close dialog"
26 >
27 <span class="pf-v6-c-button__icon">
28 <svg
29 class="pf-v6-svg"
30 fill="currentColor"
31 viewBox="0 0 20 20"
32 aria-hidden="true"
33 role="img"
34 width="1em"
35 height="1em"
36 >
37 <path
38 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"
39 />
40 </svg>
41 </span>
42 </button>
43 </div>
44 <div class="pf-v6-c-about-modal-box__header">
45 <h1 class="pf-v6-c-title pf-m-4xl" id="about-modal-title">Product name</h1>
46 </div>
47 <div class="pf-v6-c-about-modal-box__content">
48 <div class="pf-v6-c-about-modal-box__body">content</div>
49 <p
50 class="pf-v6-c-about-modal-box__strapline"
51 >Trademark and copyright information here</p>
52 </div>
53 </div>
54
55 ```
56
57 ## Documentation
58
59 In order to add a background image, set the `--pf-v6-c-about-modal-box--BackgroundImage` CSS variable to the path of the image. For example: `--pf-v6-c-about-modal-box--BackgroundImage: url(custom/path/image.jpg);`
60
61 ### Accessibility
62
63 | Attribute | Applies to | Outcome |
64 | -- | -- | -- |
65 | `aria-label="Close Dialog"` | `.pf-v6-c-modal-box__close .pf-v6-c-button` | Provides an accessible name for the close button as it uses an icon instead of text. **Required** |
66
67 ### Usage
68
69 | Class | Applied to | Outcome |
70 | -- | -- | -- |
71 | `.pf-v6-c-about-modal-box` | `<div>`, `<article>` | Initiates a modal box. |
72 | `.pf-v6-c-about-modal-box__brand` | `<div>` | Initiates a modal box brand cell. |
73 | `.pf-v6-c-about-modal-box__brand-image` | `<img>` | Initiates a modal box brand image. |
74 | `.pf-v6-c-about-modal-box__close` | `<div>` | Initiates a modal box close cell. |
75 | `.pf-v6-c-about-modal-box__header` | `<div>`, `<header>` | Initiates a modal box header cell. |
76 | `.pf-v6-c-about-modal-box__content` | `<div>` | Initiates a modal box content cell. |
77 | `.pf-v6-c-about-modal-box__body` | `<div>` | Initiates a modal box body cell. |
78 | `.pf-v6-c-about-modal-box__strapline` | `<p>` | Initiates a modal box strapline cell. |
79 | `--pf-v6-c-about-modal-box--BackgroundImage` | `.pf-v6-c-about-modal-box` | Sets the background image for the about modal. |