| 1 |
--- |
| 2 |
id: 'Panel' |
| 3 |
section: components |
| 4 |
cssPrefix: pf-v6-c-panel |
| 5 |
---import './Panel.css' |
| 6 |
|
| 7 |
## Examples |
| 8 |
|
| 9 |
### Basic |
| 10 |
|
| 11 |
```html |
| 12 |
<div class="pf-v6-c-panel"> |
| 13 |
<div class="pf-v6-c-panel__main"> |
| 14 |
<div class="pf-v6-c-panel__main-body">Main content</div> |
| 15 |
</div> |
| 16 |
</div> |
| 17 |
|
| 18 |
``` |
| 19 |
|
| 20 |
### Secondary |
| 21 |
|
| 22 |
```html |
| 23 |
<div class="pf-v6-c-panel pf-m-secondary"> |
| 24 |
<div class="pf-v6-c-panel__main"> |
| 25 |
<div class="pf-v6-c-panel__main-body">Main content with secondary styling</div> |
| 26 |
</div> |
| 27 |
</div> |
| 28 |
|
| 29 |
``` |
| 30 |
|
| 31 |
### Header |
| 32 |
|
| 33 |
```html |
| 34 |
<div class="pf-v6-c-panel"> |
| 35 |
<div class="pf-v6-c-panel__header">Header content</div> |
| 36 |
<hr class="pf-v6-c-divider" /> |
| 37 |
<div class="pf-v6-c-panel__main"> |
| 38 |
<div class="pf-v6-c-panel__main-body">Main content</div> |
| 39 |
</div> |
| 40 |
</div> |
| 41 |
|
| 42 |
``` |
| 43 |
|
| 44 |
### Footer |
| 45 |
|
| 46 |
```html |
| 47 |
<div class="pf-v6-c-panel"> |
| 48 |
<div class="pf-v6-c-panel__main"> |
| 49 |
<div class="pf-v6-c-panel__main-body">Main content</div> |
| 50 |
</div> |
| 51 |
<div class="pf-v6-c-panel__footer">Footer content</div> |
| 52 |
</div> |
| 53 |
|
| 54 |
``` |
| 55 |
|
| 56 |
### Header and footer |
| 57 |
|
| 58 |
```html |
| 59 |
<div class="pf-v6-c-panel"> |
| 60 |
<div class="pf-v6-c-panel__header">Header content</div> |
| 61 |
<hr class="pf-v6-c-divider" /> |
| 62 |
<div class="pf-v6-c-panel__main"> |
| 63 |
<div class="pf-v6-c-panel__main-body">Main content</div> |
| 64 |
</div> |
| 65 |
<div class="pf-v6-c-panel__footer">Footer content</div> |
| 66 |
</div> |
| 67 |
|
| 68 |
``` |
| 69 |
|
| 70 |
### No body |
| 71 |
|
| 72 |
```html |
| 73 |
<div class="pf-v6-c-panel"> |
| 74 |
<div class="pf-v6-c-panel__main">Main content</div> |
| 75 |
</div> |
| 76 |
|
| 77 |
``` |
| 78 |
|
| 79 |
### Raised |
| 80 |
|
| 81 |
```html |
| 82 |
<div class="pf-v6-c-panel pf-m-raised"> |
| 83 |
<div class="pf-v6-c-panel__main"> |
| 84 |
<div class="pf-v6-c-panel__main-body">Main content</div> |
| 85 |
</div> |
| 86 |
</div> |
| 87 |
|
| 88 |
``` |
| 89 |
|
| 90 |
### Bordered |
| 91 |
|
| 92 |
```html |
| 93 |
<div class="pf-v6-c-panel pf-m-bordered"> |
| 94 |
<div class="pf-v6-c-panel__main"> |
| 95 |
<div class="pf-v6-c-panel__main-body">Main content</div> |
| 96 |
</div> |
| 97 |
</div> |
| 98 |
|
| 99 |
``` |
| 100 |
|
| 101 |
### Scrollable |
| 102 |
|
| 103 |
```html |
| 104 |
<div class="pf-v6-c-panel pf-m-scrollable"> |
| 105 |
<div class="pf-v6-c-panel__main" tabindex="0"> |
| 106 |
<div class="pf-v6-c-panel__main-body"> |
| 107 |
Main content |
| 108 |
<br /> |
| 109 |
<br />Main content |
| 110 |
<br /> |
| 111 |
<br />Main content |
| 112 |
<br /> |
| 113 |
<br />Main content |
| 114 |
<br /> |
| 115 |
<br />Main content |
| 116 |
<br /> |
| 117 |
<br />Main content |
| 118 |
<br /> |
| 119 |
<br />Main content |
| 120 |
<br /> |
| 121 |
<br />Main content |
| 122 |
<br /> |
| 123 |
<br />Main content |
| 124 |
</div> |
| 125 |
</div> |
| 126 |
</div> |
| 127 |
|
| 128 |
``` |
| 129 |
|
| 130 |
### Scrollable with auto height |
| 131 |
|
| 132 |
```html |
| 133 |
<div class="pf-v6-c-panel pf-m-scrollable-auto-height pf-m-scrollable"> |
| 134 |
<div class="pf-v6-c-panel__main" tabindex="0"> |
| 135 |
<div class="pf-v6-c-panel__main-body"> |
| 136 |
Main content |
| 137 |
<br /> |
| 138 |
<br />Main content |
| 139 |
<br /> |
| 140 |
<br />Main content |
| 141 |
<br /> |
| 142 |
<br />Main content |
| 143 |
<br /> |
| 144 |
<br />Main content |
| 145 |
<br /> |
| 146 |
<br />Main content |
| 147 |
<br /> |
| 148 |
<br />Main content |
| 149 |
<br /> |
| 150 |
<br />Main content |
| 151 |
<br /> |
| 152 |
<br />Main content |
| 153 |
<br /> |
| 154 |
<br />Main content |
| 155 |
<br /> |
| 156 |
<br />Main content |
| 157 |
<br /> |
| 158 |
<br />Main content |
| 159 |
<br /> |
| 160 |
<br />Main content |
| 161 |
<br /> |
| 162 |
<br />Main content |
| 163 |
</div> |
| 164 |
</div> |
| 165 |
</div> |
| 166 |
|
| 167 |
``` |
| 168 |
|
| 169 |
### Scrollable with header and footer |
| 170 |
|
| 171 |
```html |
| 172 |
<div class="pf-v6-c-panel pf-m-scrollable"> |
| 173 |
<div class="pf-v6-c-panel__header">Header content</div> |
| 174 |
<hr class="pf-v6-c-divider" /> |
| 175 |
<div class="pf-v6-c-panel__main" tabindex="0"> |
| 176 |
<div class="pf-v6-c-panel__main-body"> |
| 177 |
Main content |
| 178 |
<br /> |
| 179 |
<br />Main content |
| 180 |
<br /> |
| 181 |
<br />Main content |
| 182 |
<br /> |
| 183 |
<br />Main content |
| 184 |
<br /> |
| 185 |
<br />Main content |
| 186 |
<br /> |
| 187 |
<br />Main content |
| 188 |
<br /> |
| 189 |
<br />Main content |
| 190 |
<br /> |
| 191 |
<br />Main content |
| 192 |
<br /> |
| 193 |
<br />Main content |
| 194 |
<br /> |
| 195 |
<br />Main content |
| 196 |
<br /> |
| 197 |
<br />Main content |
| 198 |
<br /> |
| 199 |
<br />Main content |
| 200 |
<br /> |
| 201 |
<br />Main content |
| 202 |
<br /> |
| 203 |
<br />Main content |
| 204 |
</div> |
| 205 |
</div> |
| 206 |
<div class="pf-v6-c-panel__footer">Footer content</div> |
| 207 |
</div> |
| 208 |
|
| 209 |
``` |
| 210 |
|
| 211 |
### Pill |
| 212 |
|
| 213 |
```html |
| 214 |
<div class="pf-v6-c-panel pf-m-pill"> |
| 215 |
<div class="pf-v6-c-panel__main"> |
| 216 |
<div class="pf-v6-c-panel__main-body">Main content</div> |
| 217 |
</div> |
| 218 |
</div> |
| 219 |
|
| 220 |
``` |
| 221 |
|
| 222 |
## Documentation |
| 223 |
|
| 224 |
### Usage |
| 225 |
|
| 226 |
| Class | Applied to | Outcome | |
| 227 |
| -- | -- | -- | |
| 228 |
| `.pf-v6-c-panel` | `<div>` | Initiates the panel. **Required** | |
| 229 |
| `.pf-v6-c-panel__header` | `<div>` | Initiates the panel header. | |
| 230 |
| `.pf-v6-c-panel__main` | `<div>` | Initiates the panel main content. | |
| 231 |
| `.pf-v6-c-panel__main-body` | `<div>` | Initiates a panel content body container. | |
| 232 |
| `.pf-v6-c-panel__menu` | `<div>` | Initiates a panel menu container. | |
| 233 |
| `.pf-v6-c-panel__footer` | `<div>` | Initiates the panel footer. | |
| 234 |
| `.pf-m-bordered` | `.pf-v6-c-panel` | Adds a border to the panel. | |
| 235 |
| `.pf-m-no-border` | `.pf-v6-c-panel` | Removes the border from a variant that has a default border. | |
| 236 |
| `.pf-m-raised` | `.pf-v6-c-panel` | Applies elevated styles for use when the panel appears on top of other elements. | |
| 237 |
| `.pf-m-scrollable` | `.pf-v6-c-panel` | Modifies the panel so the main content is scrollable. | |
| 238 |
| `.pf-m-scrollable-auto-height` | `.pf-v6-c-panel` | Modifies the panel to have an auto height when scrollable. | |
| 239 |
| `.pf-m-secondary` | `.pf-v6-c-panel` | Modifies the panel for secondary styles. | |
| 240 |
| `.pf-m-pill` | `.pf-v6-c-panel` | Modifies the panel for pill border radius. | |
| 241 |
| `.pf-m-full-height` | `.pf-v6-c-panel` | Makes the panel fill the available height. | |
| 242 |
| `.pf-m-glass` | `.pf-v6-c-panel` | Applies glass styling to the panel in glass theme. | |