BlogPlaygroundOne

Text and typography

Control text size, alignment, wrapping, overflow, transforms and more. By default, Vuetify uses the Material Design 3 specification Roboto Font.

ClassProperties
text-display-largefont-size: 3.5625rem (57px);
font-weight: 400;
line-height: 4rem (64px);
letter-spacing: -0.015625rem (-0.25px);
text-display-mediumfont-size: 2.8125rem (45px);
font-weight: 400;
line-height: 3.25rem (52px);
letter-spacing: 0;
text-display-smallfont-size: 2.25rem (36px);
font-weight: 400;
line-height: 2.75rem (44px);
letter-spacing: 0;
text-headline-largefont-size: 2rem (32px);
font-weight: 400;
line-height: 2.5rem (40px);
letter-spacing: 0;
text-headline-mediumfont-size: 1.75rem (28px);
font-weight: 400;
line-height: 2.25rem (36px);
letter-spacing: 0;
text-headline-smallfont-size: 1.5rem (24px);
font-weight: 400;
line-height: 2rem (32px);
letter-spacing: 0;
text-title-largefont-size: 1.375rem (22px);
font-weight: 400;
line-height: 1.75rem (28px);
letter-spacing: 0;
text-title-mediumfont-size: 1rem (16px);
font-weight: 500;
line-height: 1.5rem (24px);
letter-spacing: 0.009375rem (0.15px);
text-title-smallfont-size: 0.875rem (14px);
font-weight: 500;
line-height: 1.25rem (20px);
letter-spacing: 0.00625rem (0.1px);
text-body-largefont-size: 1rem (16px);
font-weight: 400;
line-height: 1.5rem (24px);
letter-spacing: 0.03125rem (0.5px);
text-body-mediumfont-size: 0.875rem (14px);
font-weight: 400;
line-height: 1.25rem (20px);
letter-spacing: 0.015625rem (0.25px);
text-body-smallfont-size: 0.75rem (12px);
font-weight: 400;
line-height: 1rem (16px);
letter-spacing: 0.025rem (0.4px);
text-label-largefont-size: 0.875rem (14px);
font-weight: 500;
line-height: 1.25rem (20px);
letter-spacing: 0.00625rem (0.1px);
text-label-mediumfont-size: 0.75rem (12px);
font-weight: 500;
line-height: 1rem (16px);
letter-spacing: 0.03125rem (0.5px);
text-label-smallfont-size: 0.6875rem (11px);
font-weight: 500;
line-height: 1rem (16px);
letter-spacing: 0.03125rem (0.5px);
text-high-emphasiscolor: rgba(var(–v-theme-on-background), var(–v-high-emphasis-opacity));
text-medium-emphasiscolor: rgba(var(–v-theme-on-background), var(–v-medium-emphasis-opacity));
text-disabledcolor: rgba(var(–v-theme-on-background), var(–v-disabled-opacity));
text-uppercasetext-transform: uppercase;
text-lowercasetext-transform: lowercase;
text-capitalizetext-transform: capitalize;
text-nonetext-transform: none;
text-starttext-align: start;
text-centertext-align: center;
text-endtext-align: end;
text-justifytext-align: justify;
text-lefttext-align: left;
text-righttext-align: right;
text-truncateoverflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
text-no-wrapwhite-space: nowrap;
text-pre-wrapwhite-space: pre-wrap;
text-breakoverflow-wrap: break-word;
text-decoration-nonetext-decoration: none;
text-decoration-overlinetext-decoration: overline;
text-decoration-underlinetext-decoration: underline;
text-decoration-line-throughtext-decoration: line-through;
font-weight-blackfont-weight: 900;
font-weight-boldfont-weight: 700;
font-weight-semiboldfont-weight: 600;
font-weight-mediumfont-weight: 500;
font-weight-regularfont-weight: 400;
font-weight-lightfont-weight: 300;
font-weight-thinfont-weight: 100;
font-italicfont-style: italic;
text-{breakpoint}-display-largeSet the text-display-large style for the specified breakpoint.
text-{breakpoint}-display-mediumSet the text-display-medium style for the specified breakpoint.
text-{breakpoint}-display-smallSet the text-display-small style for the specified breakpoint.
text-{breakpoint}-headline-largeSet the text-headline-large style for the specified breakpoint.
text-{breakpoint}-headline-mediumSet the text-headline-medium style for the specified breakpoint.
text-{breakpoint}-headline-smallSet the text-headline-small style for the specified breakpoint.
text-{breakpoint}-title-largeSet the text-title-large style for the specified breakpoint.
text-{breakpoint}-title-mediumSet the text-title-medium style for the specified breakpoint.
text-{breakpoint}-title-smallSet the text-title-small style for the specified breakpoint.
text-{breakpoint}-body-largeSet the text-body-large style for the specified breakpoint.
text-{breakpoint}-body-mediumSet the text-body-medium style for the specified breakpoint.
text-{breakpoint}-body-smallSet the text-body-small style for the specified breakpoint.
text-{breakpoint}-label-largeSet the text-label-large style for the specified breakpoint.
text-{breakpoint}-label-mediumSet the text-label-medium style for the specified breakpoint.
text-{breakpoint}-label-smallSet the text-label-small style for the specified breakpoint.

Usage

Control the size and style of text using the Typography helper classes. These values are based upon the Material Design type specification.

Display Large
text-display-large
Display Medium
text-display-medium
Display Small
text-display-small
Headline Large
text-headline-large
Headline Medium
text-headline-medium
Headline Small
text-headline-small
Title Large
text-title-large
Title Medium
text-title-medium
Title Small
text-title-small
Body Large
text-body-large
Body Medium
text-body-medium
Body Small
text-body-small
Label Large
text-label-large
Label Medium
text-label-medium
Label Small
text-label-small

Breakpoints

All of the typography classes support the responsive breakpoints seen in other parts of the framework. The base class .text-{variant} corresponds to the xsAndUp breakpoint, while the classes .text-{breakpoint}-{variant} can be used for the rest of the breakpoints (sm, md, lg and xl).

The following example shows a slightly contrived example of how one can use the different classes to effect:

Title
Body text

Font emphasis

Material design, by default, supports 100, 300, 400, 500, 700, 900 font weights and italicized text.

Black text.

Bold text.

Semibold text.

Medium weight text.

Normal weight text.

Light weight text.

Thin weight text.

Italic text.

Text

Alignment

Alignment helper classes allow you to easily re-align text.

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.

The alignment classes also support responsive breakpoints.

Left aligned on all viewport sizes.

Center aligned on all viewport sizes.

Right aligned on all viewport sizes.

Left aligned on viewports SM (small) or wider.

Left aligned on viewports MD (medium) or wider.

Left aligned on viewports LG (large) or wider.

Left aligned on viewports XL (extra-large) or wider.

Decoration

Remove text decoration with the .text-decoration-none class or add an overline, underline or line-through by using .text-decoration-overline, .text-decoration-underline, and .text-decoration-line-through.

Non-underlined link
Line-through text
Overline text
Underline text

Opacity

Opacity helper classes allow you to easily adjust the emphasis of text. text-high-emphasis has the same opacity as default text. text-medium-emphasis is used for hints and helper text. De-emphasize text with text-disabled.

High-emphasis has an opacity of 87% in light theme and 100% in dark.

Medium-emphasis text and hint text have opacities of 60% in light theme and 70% in dark.

Disabled text has an opacity of 38% in light theme and 50% in dark.

Transform

Text can be transformed with text capitalization classes.

Lowercased text.

Uppercased text.

capitalized text.

Text breaking and the removal of text-transform is also possible. In the first example, the text-transform: uppercase custom class is overwritten and allows the text casing to remain. In the second example, we break up a longer word to fit the available space.

Random TEXT cApitaLization

SUBDERMATOGLYPHIC

Wrapping and overflow

You can prevent wrapping text with the .text-no-wrap utility class.

This text should overflow the parent.

Longer content can be truncated with a text ellipsis using the .text-truncate utility class.

Suspendisse faucibus, nunc et pellentesque egestas, lacus ante convallis tellus.

Customizing Fonts

By default, Vuetify uses Roboto as font family for regular text and headings. You can customize the font-family by overriding the following SASS variables:

  • $body-font-family — Used for body text and most components
  • $heading-font-family — Used for headings. (defaults to $body-font-family)

Loading Custom Fonts

Before configuring Vuetify, ensure your chosen font is available in your application. There are several ways to load fonts:

  • Fonts from CDN — Add an @import in your CSS or a <link> tag in your HTML
  • Local font files — Use @font-face declarations
  • NPM packages — Install packages like @fontsource/open-sans

Configuring Vuetify

Ensure you have SASS Variables configured in your project, then set the font-family variables:

src/styles/settings.scss
@use 'sass:string';
@use 'vuetify/settings' with (
  $body-font-family: string.unquote('"Open Sans", sans-serif'),
  $heading-font-family: string.unquote('"Montserrat", sans-serif')
);

Using CSS Variables

You can use CSS custom properties for font-family values, allowing runtime changes or integration with theming systems:

src/styles/settings.scss
@use 'vuetify/settings' with (
  $body-font-family: var(--font-sans)
  // $heading-font-family inherits the same font in this example
);

RTL Alignment

When using RTL, you may want to keep the alignment regardless of current text direction. This can be achieved by setting the direction to either left or right.

If instead you want the alignment to respond to the current text direction, use start and end.

Agnostic RTL Alignment

Left aligned text, irrespective of RTL or LTR.

Right aligned text, irrespective of RTL or LTR.

Responsive RTL Alignment

Left aligned text on LTR and right aligned on RTL.

Right aligned text on LTR and left aligned on RTL.

Ready for more?

Continue your learning with related content selected by the Team or move between pages by using the navigation links below.