Debian Codegraph @

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

raw
1 ---
2 id: Title
3 section: components
4 cssPrefix: pf-v6-c-title
5 ---## Examples
6
7 ### Size modifiers
8
9 ```html
10 <h1 class="pf-v6-c-title pf-m-4xl">4xl title</h1>
11 <h1 class="pf-v6-c-title pf-m-3xl">3xl title</h1>
12 <h1 class="pf-v6-c-title pf-m-2xl">2xl title</h1>
13 <h1 class="pf-v6-c-title pf-m-xl">xl title</h1>
14 <h1 class="pf-v6-c-title pf-m-lg">lg title</h1>
15 <h1 class="pf-v6-c-title pf-m-md">md title</h1>
16
17 ```
18
19 ### Heading level modifiers
20
21 ```html
22 <h1 class="pf-v6-c-title pf-m-h1">H1-styled title</h1>
23 <h2 class="pf-v6-c-title pf-m-h2">H2-styled title</h2>
24 <h3 class="pf-v6-c-title pf-m-h3">H3-styled title</h3>
25 <h4 class="pf-v6-c-title pf-m-h4">H4-styled title</h4>
26 <h5 class="pf-v6-c-title pf-m-h5">H5-styled title</h5>
27 <h6 class="pf-v6-c-title pf-m-h6">H6-styled title</h6>
28
29 ```
30
31 ### Page title
32
33 ```html
34 <h1 class="pf-v6-c-title pf-m-2xl pf-m-page-title">2xl page title</h1>
35
36 <h1 class="pf-v6-c-title pf-m-h1 pf-m-page-title">H1 page title</h1>
37
38 ```
39
40 ## Documentation
41
42 ### Overview
43
44 The title component styles font-size, font-weight, and line-height to titles.
45
46 The content component defines margin on headers. To regain the same spacing use, spacer utility classes:
47
48 | Title | Margin top | Margin bottom |
49 | -- | -- | -- |
50 | 4xl | `.pf-v6-u-mt-lg` | `.pf-v6-u-mb-sm` |
51 | 3xl | `.pf-v6-u-mt-lg` | `.pf-v6-u-mb-sm` |
52 | 2xl | `.pf-v6-u-mt-lg` | `.pf-v6-u-mb-sm` |
53 | xl | `.pf-v6-u-mt-lg` | `.pf-v6-u-mb-sm` |
54 | lg | `.pf-v6-u-mt-lg` | `.pf-v6-u-mb-sm` |
55 | md | `.pf-v6-u-mt-lg` | `.pf-v6-u-mb-sm` |
56
57 ### Usage
58
59 | Class | Applied | Outcome |
60 | -- | -- | -- |
61 | `.pf-v6-c-title` | `h1-h6` | Initiates a title. Always use it with a modifier class. |
62 | `.pf-m-4xl` | `.pf-v6-c-title` | Modifies for 4xl size |
63 | `.pf-m-3xl` | `.pf-v6-c-title` | Modifies for 3xl size |
64 | `.pf-m-2xl` | `.pf-v6-c-title` | Modifies for 2xl size |
65 | `.pf-m-xl` | `.pf-v6-c-title` | Modifies for xl size |
66 | `.pf-m-lg` | `.pf-v6-c-title` | Modifies for lg size |
67 | `.pf-m-md` | `.pf-v6-c-title` | Modifies for md size |
68 | `.pf-m-h1` | `.pf-v6-c-title` | Modifies for default h1 size |
69 | `.pf-m-h2` | `.pf-v6-c-title` | Modifies for default h2 size |
70 | `.pf-m-h3` | `.pf-v6-c-title` | Modifies for default h3 size |
71 | `.pf-m-h4` | `.pf-v6-c-title` | Modifies for default h4 size |
72 | `.pf-m-h5` | `.pf-v6-c-title` | Modifies for default h5 size |
73 | `.pf-m-h6` | `.pf-v6-c-title` | Modifies for default h6 size |
74 | `.pf-m-page-title` | `.pf-v6-c-title` | Applies page title styles. **Note:** `.pf-m-page-title` should only apply to the heading that serves as the title for the current page. |