Menu
Advertisement
Advertisement
Advertisement

Bringing Text and Math to Life

Static content is boring. Let’s add some motion to our words and equations!

In this post, we’ll explore two new components: <TypingText /> and <StyledMath />.

Advertisement Advertisement

1. Typing Animations

Want to simulate a typewriter effect? Or maybe a terminal command being typed out?

Basic Usage

|

Custom Speed & Delay

You can control the speed and add a start delay.

|

Scroll Trigger

By default, the animation starts when the element scrolls into view.

|
Advertisement Advertisement

2. Styled Math Equations

We already love KaTeX for rendering math, but let’s make it fit our design system better.

Hand-Drawn Style

Perfect for that “back of the napkin” look.

ex2dx=π\int_{-\infty}^{\infty} e^{-x^2} dx = \sqrt{\pi}

Colorful

Highlight the beauty of math with colors.

eiπ+1=0e^{i\pi} + 1 = 0

Neon / Cyberpunk

For a modern, techy feel.

itΨ(r,t)=H^Ψ(r,t)i\hbar\frac{\partial}{\partial t}\Psi(\mathbf{r},t) = \hat H \Psi(\mathbf{r},t)
Advertisement Advertisement

3. Animated Equations

Let’s add some movement to the equations themselves.

Float

E=mc2E = mc^2

Pulse

=sin(x)2+cos(x)2\heartsuit = \sin(x)^2 + \cos(x)^2

Slide Up (On Scroll)

This equation will slide up when you scroll to it.

n=11ns=p11ps\sum_{n=1}^{\infty} \frac{1}{n^s} = \prod_{p} \frac{1}{1-p^{-s}}

Reveal

A smooth reveal effect.

ζ(s)=n=11ns\zeta(s) = \sum_{n=1}^{\infty} \frac{1}{n^s}
Advertisement Advertisement

Usage

Just like our images, these components are auto-imported!

<TypingText text="Type me!" />

<StyledMath style="neon" animation="pulse">
  $$ E = mc^2 $$
</StyledMath>

Go ahead and make your content dynamic!

Advertisement
Sponsored Content

finding (solutions) x

A public notebook and learning hub.