Skip to content
FontsNotoIconsKnowledgeFAQ

Interactive animations with variable fonts

The following guest article was written by Nick Sherman*

Variable fonts allow for seamless, fluid blending between stylistic variants, making them excellent candidates for simple, lightweight animations. Variable font animations can provide subtle effects for user interactions and visual semantics, or they can be used for more dramatic special effects.

Simple Hover Effects

For a simple example of hover interaction, let’s consider hyperlinks that change weight on hover:

An animated loop showing the effects of the styling discussed in the preceding text.

Basic weight change on hover. Typeface: Newsreader.

The effect is rather sudden, switching between weights instantly on hover. With variable fonts, though, it’s possible smooth the effect using a simple transition:

An animated loop showing the effects of font weight being animated, and how it affects elements around it.

Subtle hover animation with variable fonts.

Instead of jumping between static weights, the change is continuous. Just be careful not to make animations too long—even one-second animations can feel tedious for quick hover interactions.

It’s very common for bolder weights of a typeface to occupy more space, which causes subtle shifts in positioning. For menus and other small pieces of text, such shifts can be minimized by isolating elements from each other in separate fixed containers:

An animated loop showing how the text still grows in horizontal space, but doesn’t affect the other elements around it.

Hover animation with each element in separate fixed containers to prevent layout shift.

Multiplexed Weight and Grades

For more demanding situations where shifts in positioning aren’t acceptable at all, you can use “multiplexed” fonts, designed specifically to occupy the same amount of space across a range of variants. When the Regular and Bold weights occupy the same amount of horizontal spacing, the hover effect feels more seamless. It is also crucial for use within paragraphs of body text where layout shifts would be too distracting otherwise.

An animated loop showing how text shifts when using non-multiplexed fonts.

Typeface: Newsreader.

An animated loop showing how no text shifts when using multiplexed fonts.

Multiplexed fonts prevent shifts in the layout by maintaining the same width requirements across variants. Typeface: Recursive.

On a related note, some variable fonts also offer a “grade” axis separate from (and often in addition to) the standard weight axis. This allows for multiplexed adjustments to a typeface’s apparent weight even if its standard weight axis would otherwise affect spacing.

Not all variable fonts offer multiplexed variations, but there is a growing selection available. And it’s worth noting that almost all monospaced variable fonts are naturally multiplexed.

Multiplexing Beyond Weight

Multiplexing isn’t limited to just standard variations in weight or grades either. For example, some variable fonts have an adjustable italic axis that doesn’t affect spacing. Other variable fonts may offer multiplexed variations that are much more unusual, allowing for more stylized special effects:

An animated loop showing the way different elements of the type’s design can be manipulated.

Multiplexed hover animations with variations other than standard weight. Typeface: Cheee Variable.

Finally, for other special interactive effects, keep in mind that :hover isn’t limited to just hyperlinks. For example, you can wrap arbitrary elements in their own span elements and use that for triggering hover effects. You can also tweak the timing of a transition to make it faster or slower:

An animated loop showing how each letter drips with a slime-like effect when the user hovers over them.

Multiplexed hover effects with more expressive variations, on a letter-by-letter basis. Typeface: Cheee Variable.

Interactivity is a virtually infinite space for experience design, and variable fonts offer that much more room for exploration. For more ideas on using variable fonts, see the other articles listed under the topic of variable fonts.

* Content is owned by Google. Thank you to Laurence Penney and Piper Haywood for reviewing this content.

Interactive animations with variable fonts – Fonts Knowledge - Google Fonts