Skip to content
Dashboard

Improving readability with React Wrap Balancer

A binary search algorithm to easily manage text-wrapping.

Copy link to headingSolving the text wrapping dilemma

Copy link to headingThe current solution

The Vercel blog, before and after React Wrap Balancer.The Vercel blog, before and after React Wrap Balancer.
The Vercel blog, before and after React Wrap Balancer.

Copy link to headingTech specs

A demonstration of how React Wrap Balancer minimizes content wrapper width to match line lengths.
A tooltip on the Vercel site, before and after React Wrap Balancer.A tooltip on the Vercel site, before and after React Wrap Balancer.
A tooltip on the Vercel site, before and after React Wrap Balancer.

Copy link to headingSolving for layout shift

Copy link to headingResizing the wrapper

A demonstration of text formatting dynamically with React Wrap Balancer and ResizeObserver.

Copy link to headingWhat about Svelte?

Copy link to headingUse React Wrap Balancer in your project

app.tsx
import Balancer from 'react-wrap-balancer'
// ...
function Title() {
return(
<h1>
<Balancer>My readability is improved by React Wrap Balancer!</Balancer>
</h1>
)
}

An example of how to get started with React Wrap Balancer.

Ready to deploy?