Header
Utility classes for all typography elements.
Bento uses three font stacks. Use these classes ff-sans-serif
, ff-serif
and ff-mono
to change the font-family
<p className="ff-sans-serif">...</p>
<p className="ff-serif">...</p>
<p className="ff-mono">...</p>
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.
<p className="fs-9">...</p>
<p className="fs-2">...</p>
. . .
<p className="fs-1">...</p>
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
<p className="fw-800">...</p>
<p className="fw-600">...</p>
<p className="fw-500">...</p>
<p className="fw-400">...</p>
Change the line height density with these classes.
<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.
This property allows you to make text appear italicized. By default the font-style
is set to normal
<p className="fs-italic">...</p>
<p className="fs-normal">...</p>
Change the appearance of the decorative lines using these classes.
<p className="td-underline">...</p>
<p className="td-none">...</p>
<p className="td-line-through">...</p>
Change the alignment of the text using these classes.
<div className="ta-left">...</div>
<div className="ta-right">...</div>
<div className="ta-center">...</div>
<div className="ta-justify">...</div>
This property controls the application of anti-aliasing when fonts are rendered.
<p class="fs-antialiased">...</p>
Defines the spacing between the characters of a block of text.
<p className="ls-tight">...</p>
<p className="ls-normal">...</p>
<p className="ls-wide">...</p>
The color of the text can be changed by adding the color variables/classes.
<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.
This property specifies how to capitalize an element's text.
<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>
Defines how whitespace is handled inside an element.
<p className="ws-normal">...</p>
<p className="ws-nowrap">...</p>