Skip to content
Calm motion: animations on this site only fade, with no movement

Type scale ​

A specimen of the font sizes, with the size, the line height, and the name

Shows each step of a type scale with a line of text in that size, on a design page. With no steps, it shows the text sizes of this library. For the tokens as a table, see the tokens guide.

Basic
--bless-text-2xs

Home Studio, real sound

--bless-text-xs

Home Studio, real sound

--bless-text-sm

Home Studio, real sound

--bless-text-md

Home Studio, real sound

--bless-text-lg

Home Studio, real sound

--bless-text-xl

Home Studio, real sound

--bless-text-headline

Home Studio, real sound

--bless-text-display

Home Studio, real sound

  • steps is a list of steps. Each step has a name, a CSS size, and an optional lineHeight and weight. Without it, the steps are the --bless-text-* tokens, from the smallest to the largest.
  • sample is the line of text in each size.
  • Each row shows the size and the line height in pixels, as the browser draws them. The sizes of this library use clamp(), so the numbers change with the width of the window. They show after the page loads.
  • On a narrow screen, the name goes above the sample. A long sample ends with "…".
  • The specimen is a region. Change the words with labels or a label pack: title, size, and line.

Usage ​

ts
import { BlessTypeScale } from "blessing-ui";

API ​

Props

NameTypeDefaultDescription
stepsBlessTypeStep[]—the steps to show; default: the text sizes of the library
samplestring"Home Studio, real sound"the words to show in each size
labelsPartial<{ title: string; size: string; line: string; }>—

Released under the MIT License. Character names and artwork belong to their owners.