| 1 |
--- |
| 2 |
id: Alignment |
| 3 |
section: foundations-and-styles |
| 4 |
subsection: utility-classes |
| 5 |
---import './Alignment.css' |
| 6 |
|
| 7 |
## Examples |
| 8 |
|
| 9 |
### Basic |
| 10 |
|
| 11 |
```html |
| 12 |
<div class="pf-v6-u-text-align-start">Text start</div> |
| 13 |
<div class="pf-v6-u-text-align-center">Text center</div> |
| 14 |
<div class="pf-v6-u-text-align-end">Text end</div> |
| 15 |
<div class="pf-v6-u-text-align-justify"> |
| 16 |
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod |
| 17 |
tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, |
| 18 |
quis nostrud exercitation ullamco laboris. |
| 19 |
</div> |
| 20 |
|
| 21 |
``` |
| 22 |
|
| 23 |
## Documentation |
| 24 |
|
| 25 |
### Overview |
| 26 |
|
| 27 |
[Breakpoints](/foundations-and-styles/design-tokens/all-design-tokens) are optional. Breakpoint options include: base (no breakpoint value), `-on-sm`, `-on-md`, `-on-lg`, and `-on-xl`. Example: `.pf-v6-u-text-align-start-on-lg` |
| 28 |
|
| 29 |
### Usage |
| 30 |
|
| 31 |
| Class | Applied to | Outcome | |
| 32 |
| -- | -- | -- | |
| 33 |
| `.pf-v6-u-text-align-start{-on-[breakpoint]}` | `*` | Aligns text start | |
| 34 |
| `.pf-v6-u-text-align-center{-on-[breakpoint]}` | `*` | Aligns text center | |
| 35 |
| `.pf-v6-u-text-align-end{-on-[breakpoint]}` | `*` | Aligns text end | |
| 36 |
| `.pf-v6-u-text-align-justify{-on-[breakpoint]}` | `*` | Aligns text justify | |