.text-default Fusce dapibus, tellus ac cursus commodo, tortor mauris nibh.
.text-primary Nullam id dolor id nibh ultricies vehicula ut id elit.
.text-secondary Nullam nisi erat porttitor ligula vehicula ut id.
.text-disabled Duis mollis, est non commodo luctus, nisi erat porttitor ligula.
.text-success Dapibus cursus commodo, tortor mauris nibh amet non magna.
.text-error Maecenas sed diam eget risus varius blandit sit amet non magna.
.text-warning Nullam id dolor id nibh ultricies vehicula ut id elit.
<pclass="text-default"><code>.text-default</code> Fusce dapibus, tellus ac cursus commodo, tortor mauris nibh.</p><pclass="text-primary"><code>.text-primary</code> Nullam id dolor id nibh ultricies vehicula ut id elit.</p><pclass="text-secondary"><code>.text-secondary</code> Nullam nisi erat porttitor ligula vehicula ut id.</p><pclass="text-disabled"><code>.text-disabled</code> Duis mollis, est non commodo luctus, nisi erat porttitor ligula.</p><pclass="text-success"><code>.text-success</code> Dapibus cursus commodo, tortor mauris nibh amet non magna.</p><pclass="text-error"><code>.text-error</code> Maecenas sed diam eget risus varius blandit sit amet non magna.</p><pclass="text-warning"><code>.text-warning</code> Nullam id dolor id nibh ultricies vehicula ut id elit.</p>
Dealing with specificity! Sometimes emphasis classes cannot be applied due to the specificity of another selector. In most cases, a sufficient workaround is to wrap your text in a <span> with the class.
Alignments
Easily re-align text to components with text alignment classes.
For left, right, and center alignment, responsive classes are available that use the same viewport width breakpoints as the grid system.
.text-left or .text-{xs,sm,md,lg,xl,xxl}-left
text-align: left;
.text-center or .text-{xs,sm,md,lg,xl,xxl}-center
text-align: center;
.text-right or .text-{xs,sm,md,lg,xl,xxl}-right
text-align: right;
.text-justify or .text-{xs,sm,md,lg,xl,xxl}-justify
.text-left Left aligned text on all viewport sizes.
.text-center Center aligned text on all viewport sizes.
.text-right Right aligned text on all viewport sizes.
.text-justify This is a long paragraph written to show how the 'text-justify' class affect it. Classes are applied to the element itself. Nullam id dolor_id nibh_ultricies_vehicula ut id elit. This is a long paragraph written to show how the 'text-justify' class affect it. Classes are applied to the element itself. Nullam id dolor_id nibh_ultricies_vehicula ut id elit.
.text-sm-right Right aligned text on viewports sized SM (small) or wider.
.text-xxl-right Right aligned text on viewports sized XXL or wider.
<pclass="text-left"><code>.text-left</code> Left aligned text on all viewport sizes.</p><pclass="text-center"><code>.text-center</code> Center aligned text on all viewport sizes.</p><pclass="text-right"><code>.text-right</code> Right aligned text on all viewport sizes.</p><pclass="text-justify"><code>.text-justify</code> This is a long paragraph written to show how the 'text-justify' class affect it. Classes are applied to the element itself. Nullam id dolor_id nibh_ultricies_vehicula ut id elit. This is a long paragraph written to show how the 'text-justify' class affect it. Classes are applied to the element itself. Nullam id dolor_id nibh_ultricies_vehicula ut id elit.</p><pclass="text-sm-right"><code>.text-sm-right</code> Right aligned text on viewports sized SM (small) or wider.</p><pclass="text-xxl-right"><code>.text-xxl-right</code> Right aligned text on viewports sized XXL or wider.</p>
Text decoration
Helper classes for controlling the decoration of text.
<p><code>.text-underline</code><spanclass="text-underline">Underline text</span></p><p><code>.text-line-through</code><spanclass="text-line-through">Text with line through</span></p><p><code>.text-no-underline</code><aclass="text-no-underline"> 'a' element without underline</a></p>
Text overflow
Prevent text from wrapping with a .text-nowrap class.
<codeclass="d-inline-block">.text-nowrap</code><divclass="text-nowrap bg-default border d-inline-block p-4"style="width: 120px;">This text should overflow the parent.</div>
For longer text you can add extension points by adding .text-truncate class. Requires display: inline-block or display: block.
Also you have the option to add helper classes to truncate the text not only for one row, but for 2,3 or 4 rows. Check out the example below.
This text should have maximum 1 row and if longer ellipsis will appear.
.text-truncate-2
This text should have maximum 2 rows and if longer ellipsis will appear.
.text-truncate-3
This text should have maximum 3 rows and if longer ellipsis will appear.
.text-truncate-4
This text should have a maximum of 4 rows and if longer ellipsis will appear and you won't see the end of this sentence.
<divclass="d-flex align-items-center"><codeclass="d-inline-block pr-8">.text-truncate</code><pclass="d-inline-block mb-0"><spanclass="text-truncate"style="max-width: 160px;">This text should have maximum 1 row and if longer ellipsis will appear.</span></p></div><br><divclass="d-flex align-items-center"><codeclass="d-inline-block pr-8">.text-truncate-2</code><pclass="text-truncate-2 mb-0"style="max-width: 160px;">This text should have maximum 2 rows and if longer ellipsis will appear.</p></div><br><divclass="d-flex align-items-center"><codeclass="d-inline-block pr-8">.text-truncate-3</code><pclass="text-truncate-3 mb-0"style="max-width: 160px;">This text should have maximum 3 rows and if longer ellipsis will appear.</p></div><br><divclass="d-flex align-items-center"><codeclass="d-inline-block pr-8">.text-truncate-4</code><pclass="text-truncate-4 mb-0"style="max-width: 150px;">This text should have a maximum of 4 rows and if longer ellipsis will appear and you won't see the end of this sentence.</p></div>
Text transform
Transform text in components with text transform classes. You can use any ot this classes: text-lowercase, text-uppercase or text-capitalize
Use the clasees below to enable additional fractions (sans-serif support it) or ordinal markers (monospace support it), in fonts that support them (the Open Sans and Ubuntu, for the moment doesn't support it).
<p><code>.font-weight-bold</code> or <code>.bold</code><spanclass="bold">Bold text.</span></p><p><code>.font-weight-normal</code> or <code>.normal</code><spanclass="normal">Normal weight text.</span></p><p><code>.font-weight-light</code> or <code>.light</code><spanclass="light">Light weight text.</span></p>
Font family
Helper classes for controlling the font family of an element. In the Design System we have only 2 types of fonts: Open Sans (default type - that is used in the body) and Ubuntu (used for branding and some types of headings).
.font-family-open-sansThe font used for this paragraph is Open Sans.
.font-family-ubuntuThe font used for this paragraph is Ubuntu.
.font-family-ubuntu-lightThe font used for this paragraph is Ubuntu Light.
.font-family-ubuntu-semiboldThe font used for this paragraph is Ubuntu Semibold.
.font-family-ubuntu-boldThe font used for this paragraph is Ubuntu Bold.
<p><code>.font-family-open-sans</code><spanclass="font-family-open-sans">The font used for this paragraph is Open Sans.</span></p><p><code>.font-family-ubuntu</code><spanclass="font-family-ubuntu">The font used for this paragraph is Ubuntu.</span></p><p><code>.font-family-ubuntu-light</code><spanclass="font-family-ubuntu-light">The font used for this paragraph is Ubuntu Light.</span></p><p><code>.font-family-ubuntu-semibold</code><spanclass="font-family-ubuntu-semibold">The font used for this paragraph is Ubuntu Semibold.</span></p><p><code>.font-family-ubuntu-bold</code><spanclass="font-family-ubuntu-bold">The font used for this paragraph is Ubuntu Bold.</span></p>
Font size
Helper classes for controlling the font size of an element.
.font-13The font used for this paragraph is 13px (1.3rem).
.font-14The font used for this paragraph is 14px (1.4rem).
.font-16The font used for this paragraph is 16px (1.6rem).
.font-20The font used for this paragraph is 20px (2rem).
.font-24The font used for this paragraph is 20px (2.4em).
.font-32The font used for this paragraph is 32px (3.2rem).
.font-48The font used for this paragraph is 48px (4.8rem).
<p><code>.font-13</code><spanclass="font-13">The font used for this paragraph is 13px (1.3rem).</span></p><p><code>.font-14</code><spanclass="font-14">The font used for this paragraph is 14px (1.4rem).</span></p><p><code>.font-16</code><spanclass="font-16">The font used for this paragraph is 16px (1.6rem).</span></p><p><code>.font-20</code><spanclass="font-20">The font used for this paragraph is 20px (2rem).</span></p><p><code>.font-24</code><spanclass="font-24">The font used for this paragraph is 20px (2.4em).</span></p><p><code>.font-32</code><spanclass="font-32">The font used for this paragraph is 32px (3.2rem).</span></p><p><code>.font-48</code><spanclass="font-48">The font used for this paragraph is 48px (4.8rem).</span></p>
The font used for this paragraph has 20px, the font family is Ubuntu Semibold, is uppercased, has underline, uses a primary color and it's truncated.
<pclass="font-20 font-family-ubuntu-semibold text-uppercase text-truncate text-underline text-center text-primary w-100">The font used for this paragraph has 20px, the font family is Ubuntu Semibold, is uppercased, has underline, uses a primary color and it's truncated.</p>