Header

Typography

Utility classes for all typography elements.

Font family

Bento uses three font stacks. Use these classes ff-sans-serif, ff-serif and ff-mono to change the font-family

MillimeterMillimeterMillimeter
<p className="ff-sans-serif">...</p>
<p className="ff-serif">...</p>
<p className="ff-mono">...</p>

Font size

Bento's type scale has the following classes to change the font size of an element. Use it in combination with font weight and line height for better harmony.

Class
Output
.fs-1
font-size:10px;
.fs-2
font-size:12px;
.fs-3
font-size:14px;
.fs-4
font-size:16px;
.fs-5
font-size:18px;
.fs-6
font-size:20px;
.fs-7
font-size:24px;
.fs-8
font-size:28px;
.fs-9
font-size:32px;
MillimeterMillimeterMillimeterMillimeterMillimeterMillimeterMillimeterMillimeterMillimeter
<p className="fs-9">...</p>
<p className="fs-2">...</p>
. . .
<p className="fs-1">...</p>

Font weight

The available range of weights is 100(Ultra thin) to 900(Black). Some of the commonly used weights are .fw-400, .fw-500, .fw-600 and .fw-800

MillimeterMillimeterMillimeterMillimeter
<p className="fw-800">...</p>
<p className="fw-600">...</p>
<p className="fw-500">...</p>
<p className="fw-400">...</p>

Line height

Change the line height density with these classes.

Class
Output
.lh-solid
line-height:1;
.lh-title
line-height:1.25;
.lh-copy
line-height:1.5;
Line height of this paragraph is set to 1. The quick brown fox jumped over the lazy dog. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
Line height of this paragraph is set to 1.25.The quick brown fox jumped over the lazy dog. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
Line height of this paragraph is set to 1.5.The quick brown fox jumped over the lazy dog. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
<p className="lh-solid">...</p>
<p className="lh-title">...</p>
<p className="lh-copy">...</p>

Additionally, .lh-none sets the line-height to 0. It's best to not use it unless needed for a specific usecase.

Font style

This property allows you to make text appear italicized. By default the font-style is set to normal

Class
Output
.fs-italic
font-style:italic;
.fs-normal
font-style:normal;
MillimeterMillimeter
<p className="fs-italic">...</p>
<p className="fs-normal">...</p>

Text decoration

Change the appearance of the decorative lines using these classes.

Class
Output
.td-underline
text-decoration: underline;
.td-none
text-decoration: none;
.td-line-through
text-decoration: line-through;
MillimeterMillimeterMillimeter
<p className="td-underline">...</p>
<p className="td-none">...</p>
<p className="td-line-through">...</p>

Text align

Change the alignment of the text using these classes.

Class
Output
.ta-left
text-align: left;
.ta-right
text-align: left;
.ta-center
text-align: center;
.ta-justify
text-align: justify;
Hello
Hello
Hello
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
<div className="ta-left">...</div>
<div className="ta-right">...</div>
<div className="ta-center">...</div>
<div className="ta-justify">...</div>

Font smoothing

This property controls the application of anti-aliasing when fonts are rendered.

Class
Output
.fs-antialiased
font-smoothing: antialiased;
Antialiased
<p class="fs-antialiased">...</p>

Letter spacing

Defines the spacing between the characters of a block of text.

Class
Output
.ls-tight
letter-spacing: -1px;
.ls-normal
letter-spacing: 0px;
.ls-wide
letter-spacing: 1px;
Tightly letter-spaced at -1px
No additional letter-spacing applied
Loosely letter-spaced at 1px
<p className="ls-tight">...</p>
<p className="ls-normal">...</p>
<p className="ls-wide">...</p>

Text color

The color of the text can be changed by adding the color variables/classes.

Class
Output
.c-primary-500
color: #F77728;
.c-secondary-500
color: #3366CC;
.c-tertiary-500
color: #37404E;
.c-success-500
color: #80AA01;
.c-error-500
color: #FF3C2B;
MillimeterMillimeterMillimeterMillimeterMillimeter
<p className="c-primary-500">...</p>
<p className="c-secondary-500">...</p>
<p className="c-tertiary-500">...</p>
<p className="c-success-500">...</p>
<p className="c-error-500">...</p>

Additionally, refer the color page of the utilities to see all possible colors of the palette.

Text transform

This property specifies how to capitalize an element's text.

Class
Output
.tt-normalcase
text-transform: normal;
.tt-uppercase
text-transform: uppercase;
.tt-lowercase
text-transform: lowercase;
.tt-capitalize
text-transform: capitalize;
.tt-unset
text-transform: unset;
millimetermillimetermillimetermillimetermillimeter
<p className="tt-normalcase">...</p>
<p className="tt-uppercase">...</p>
<p className="tt-lowercase">...</p>
<p className="tt-capitalize">...</p>
<p className="tt-unset">...</p>

whitespace

Defines how whitespace is handled inside an element.

Class
Output
.ws-normal
whitespace: normal;
.ws-nowrap
whitespace: nowrap;
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do
<p className="ws-normal">...</p>
<p className="ws-nowrap">...</p>