Skip to content
Dashboard

Improving readability with React Wrap Balancer

A binary search algorithm to easily manage text-wrapping.

Link to headingSolving the text wrapping dilemma

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.

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.

Link to headingSolving for layout shift

Link to headingResizing the wrapper

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

Link to headingWhat about Svelte?

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.