Skip to main content

Font Size

Utilities for controlling the font size of an element.

CSS Property:font-size
Classes:13

Font Size Classes

ClassCSS
text-xsfont-size: 0.75rem; line-height: 1rem;
text-smfont-size: 0.875rem; line-height: 1.25rem;
text-basefont-size: 1rem; line-height: 1.5rem;
text-lgfont-size: 1.125rem; line-height: 1.75rem;
text-xlfont-size: 1.25rem; line-height: 1.75rem;
text-2xlfont-size: 1.5rem; line-height: 2rem;
text-3xlfont-size: 1.875rem; line-height: 2.25rem;
text-4xlfont-size: 2.25rem; line-height: 2.5rem;
text-5xlfont-size: 3rem; line-height: 1;
text-6xlfont-size: 3.75rem; line-height: 1;
text-7xlfont-size: 4.5rem; line-height: 1;
text-8xlfont-size: 6rem; line-height: 1;
text-9xlfont-size: 8rem; line-height: 1;

Arbitrary Values

You can use arbitrary values with square bracket notation when you need a specific value not included in the default scale.

[font-size:value]

Responsive Variants

Apply font size utilities at specific breakpoints using responsive prefixes.

BreakpointPrefixExample
640px+sm:sm:text-xs
768px+md:md:text-xs
1024px+lg:lg:text-xs
1280px+xl:xl:text-xs
1536px+2xl:2xl:text-xs