Juliya

Wrap text around language-aware boundaries and the actual width of your layout.

Build a better experience for everyone, wherever they choose to read.

Try your own text

Change the text, width or font size to see both layouts update.

Advanced: forced breaks
Place the cursor where you want a line break.
Native CSSMeasuring

Build a better experience for everyone.

CSS code
const text = "Build a better experience for everyone.";
const style = {
  width: 320, maxWidth: "100%", fontSize: 24,
  fontWeight: 650, lineHeight: 1.55,
  letterSpacing: "-.037em",
};

<p style={{ ...style, whiteSpace: "pre-wrap",
  wordBreak: "keep-all", overflowWrap: "anywhere" }}>
  {text}
</p>

Integrate into your project

Start with the API for your framework, then share defaults across the project.

One install. Your existing code.

Choose your framework and preserve plain text, emphasis and links.

pnpm add @oddmash/juliya
import { JuliyaProvider, JuliyaText } from '@oddmash/juliya/react';

<JuliyaProvider locale="en">
  <JuliyaText as="h1">
    Make every line easier to read.
  </JuliyaText>
</JuliyaProvider>
React / Next.jsDocs

Configure once per project.

Declare language and wrapping defaults in JSON, then pass them to your provider. Explicit component options still take precedence.

Project configuration guide
{
  "locale": "en",
  "strategy": "balanced",
  "breakLongWords": true,
  "include": [
    "h1",
    ".article p"
  ],
  "exclude": [
    "pre"
  ]
}

Guides for your integration

Compare real literary text

Compare original-language excerpts with the same font and width. The demo looks for a contrasting width first; other widths can produce identical line breaks.

260px

Actual comparison width may be smaller on narrow screens.

Frankenstein · Mary Shelley · 1818

Native CSS

You will rejoice to hear that no disaster has accompanied the commencement of an enterprise which you have regarded with such evil forebodings.

Measuring rendered line breaks.

Mary Wollstonecraft (Godwin) Shelley; Project Gutenberg ebook 84; Judith Boss, Christy Phillips, Lynn Hanninen, and David Meltzer; HTML by Al Haines · Public-domain underlying work; Project Gutenberg source terms · Excerpt only; no editorial text. Source

Explore the full corpus

Make every line easier to read.

Read the docs