Inline markup
Use inline mode for plain text elements with links or emphasis. Existing nested text markup is preserved. Late client mounting can show native wrapping first. Mount visible text early, and allow enough margin for lazy mounts before entering the viewport. Preload necessary fonts and choose a fallback; waiting for document.fonts.ready may reduce font-related reflows but delays enhancement. Keep fallback text accessible.
React and Next.js
Use JuliyaText for supported inline text children. Links and emphasis remain available; arbitrary components and block children are not measured.
<JuliyaText as="p"><strong>Read every line naturally.</strong> <a href="/docs/">Docs</a></JuliyaText>Plain HTML
Mount inline mode on an existing element. Cleanup preserves author nodes and removes generated breaks.
import { mountJuliya } from '@oddmash/juliya/dom';
const controller = mountJuliya(element, { inline: true, locale: 'en' });Line breaks and measurement
Explicit source breaks take priority. The adapter measures inline font styles; protected code can fall back to browser wrapping.
First paint and fonts
Mount visible text early. Preload required fonts and keep fallback text accessible. Waiting for fonts may reduce reflow but delays enhancement.