Text
Text Utilities
Canvas includes Bootstrap 5 text utilities plus its own extensions for size, letter spacing, and weight.
Alignment and wrapping
.text-start, .text-center, .text-end, plus responsive variants (.text-md-center). Wrapping: .text-nowrap, .text-truncate, .text-break.
Transform and style
| Class | Effect |
|---|---|
.text-lowercase |
lowercase |
.text-uppercase |
UPPERCASE |
.text-capitalize |
Capitalize Each Word |
.text-transform-none |
remove inherited transform |
.fst-italic |
italic |
.fst-normal |
normal style |
Size
Canvas relative sizes:
| Class | Size |
|---|---|
.text-larger |
120% of current |
.text-smaller |
80% of current |
.small |
Bootstrap small |
Font weight
.fw-extralight, .fw-light, .fw-lighter, .fw-normal, .fw-medium, .fw-semibold, .fw-bold, .fw-bolder.
Line height
.lh-1, .lh-sm, .lh-base, .lh-lg.
Letter spacing (Canvas)
| Class | Spacing |
|---|---|
.ls-0 |
0 |
.ls-1 |
1px |
.ls-2 |
2px |
.ls-3 |
3px |
.ls-4 |
4px |
.ls-5 |
5px |
Color
.text-primary, .text-secondary, .text-body, .text-muted, .text-dark, .text-light, .text-reset, plus the contrast scale .text-contrast-0 to .text-contrast-1000.
Usage
<span class="text-uppercase ls-2 fw-semibold text-smaller text-muted">
Overline label
</span>
<h2 class="fw-bold lh-sm">A tight, bold headline</h2>
<p class="text-larger text-body">Slightly larger lead paragraph.</p>Classes
| Class | Description |
|---|---|
.nott | Sets text-transform CSS property to none |
.ls0 | Sets letter-spacing CSS property to 0px |
.ls1 | Sets letter-spacing CSS property to 1px |
.ls2 | Sets letter-spacing CSS property to 2px |
.ls3 | Sets letter-spacing CSS property to 3px |
.ls4 | Sets letter-spacing CSS property to 4px |
.ls5 | Sets letter-spacing CSS property to 5px |
.font-body | Sets the current Body Font defined in css/fonts.css File |
.font-primary | Sets the current Primary Font defined in css/fonts.css File |
.font-secondary | Sets the current Secondary Font defined in css/fonts.css File |
.fw-extralight | Sets the font-weight CSS property to 100 |
.fw-medium | Sets the font-weight CSS property to 500 |
.fw-semibold | Sets the font-weight CSS property to 600 |
.fw-normal | Sets the font-weight CSS property to normal |
More Font Weight Classes | More Font Weight Utility Classes can be found here: https://getbootstrap.com/docs/5.1/utilities/text/#font-weight-and-italics . |
.text-smaller | Sets the font-size CSS property to 80% of the parent |
.text-larger | Sets the font-size CSS property to 120% of the parent |
Was this page helpful?
