A title cut into pill tiles between its words: off centre they sit on two staggered rows, at the centre of the view they cross and drop into one line.
Scroll insideScroll inside
Tallyhouse · Release notes
Reading v4.2 · 28 Oct
Version 4.2 · 28 Oct
Exports run in the backgroundExportsruninthebackground
Large CSV and PDF exports keep going after you close the tab.
You get one email with every file when the batch is done.
Version 4.1 · 14 Oct
Saved views for every tableSavedviewsforeverytable
Filters, sorting and column widths are kept per view.
Share a view with your team from the toolbar.
Version 4.0 · 30 Sep
A faster invoice editorAfasterinvoiceeditor
Line items load as you scroll, even on 2,000 row invoices.
Tax rates are suggested from the customer's country.
Version 3.9 · 12 Sep
Approvals on mobileApprovalsonmobile
Approve or send back expenses from the phone app.
Push notice for each request.
split-line · , lively
split-line-demo.tsx
When to use
Use for a one-sentence title that marks a position or a state: tiles sit on two rows away from the middle of the scroll area and drop into one line, or follow a composed prop.
When not to use
Not for long headings or titles that must be selectable: use plain text. For a title that counts work use Count Marble.
Use Split Line for titles that mark a position or a state: the entries of a changelog or release notes, the steps of a long page, a title that closes when a checklist is complete. Each word sits in a flat pill tile. Away from the middle of the scroll area the tiles are on two staggered rows; when the title reaches the middle they cross and settle into one line. The same change can be driven by your app with composed. It takes one sentence of plain text. For a title that must stay selectable and copyable, or for a long heading, use plain text: the visible tiles cannot be selected.
import { SplitLine } from "@/components/ui/split-line"export function Release({ title }: { title: string }) { return ( <SplitLine as="h2" className="text-3xl font-semibold tracking-tight"> {title} </SplitLine> )}
children is a string: the component cuts it between words, so one sentence is the limit. Give the heading its size and weight with className; the tiles are sized in em and follow it. By default the scroll position of the page decides when the line composes. Inside a scrolling panel, pass the panel with scrollRoot so the middle of that panel is used.
const panel = useRef<HTMLDivElement>(null)<div ref={panel} className="h-[32rem] overflow-y-auto"> <SplitLine scrollRoot={panel} preset="stair" temperament="calm"> Saved views for every table </SplitLine></div>
Wrap the titles that share a scroll area in SplitLineGroup and give each one a value. Only the title nearest the middle composes; the others wait open, with their stagger following the scroll. The group reports the current title with onValueChange, so a side nav or a "Reading" label can follow it, and setting value scrolls that title to the middle of the area, where it composes (the titles passed on the way stay open). Scrolled to the very top or bottom, the first or last title on screen counts as the one being read, even if it cannot reach the middle.
For a title that reflects the state of your app, control it: composed is true when the line is one pill and false when it is open, and the scroll is ignored. onComposedChange fires when the line composes or opens, from scroll or from the prop.
Presets change the stagger, never the drawing: zigzag (default, alternate words up and down), shear (first half up, second half down, closing like scissors) and stair (a diagonal from the first word to the last). offset (0.5 to 1.3 tile heights) sets the charge stagger, seam the open gap in px, intensity (0 to 1) scales the wind-up, crossing and put-down.
Set the character for the whole app with MotionKitProvider, or per instance with temperament (calm, lively, playful). It changes motion intensity only, never the drawing.
The default demo: release notes in a scrolling main area, in a SplitLineGroup. Only the version being read has its title in one line. The side nav (a row of versions on narrow screens) and the "Reading" label in the header follow it; pick a version and its title scrolls to the middle and pulls together.
Scroll insideScroll inside
Tallyhouse · Release notes
Reading v4.2 · 28 Oct
Version 4.2 · 28 Oct
Exports run in the backgroundExportsruninthebackground
Large CSV and PDF exports keep going after you close the tab.
You get one email with every file when the batch is done.
Version 4.1 · 14 Oct
Saved views for every tableSavedviewsforeverytable
Filters, sorting and column widths are kept per view.
Share a view with your team from the toolbar.
Version 4.0 · 30 Sep
A faster invoice editorAfasterinvoiceeditor
Line items load as you scroll, even on 2,000 row invoices.
Tax rates are suggested from the customer's country.
preset="stair", controlled by a switch. While the nightly sync is off the title falls down a stair, word by word; turning it on pulls the words into one line.
Scroll insideScroll inside
Integrations · Bank feedPaused
Payouts sync every nightPayoutssynceverynight
New payouts and fees are matched to open invoices at 02:00 in your workspace time zone.
Charge. The title enters the middle band of the scroll area: the seams close and the rows pull apart a little further.
Action. The tiles cross each other into one line, starting from the middle tile and moving outward, and pass the line.
Settle. They spring back and land on their plate, which squashes under them. Then the hairline seams dissolve and the row becomes one pill. Leaving the middle band opens the line again, with a small margin so a title resting on the edge does not flicker. In between, the stagger grows or shrinks with the distance from the middle.
The tiles are soft pills: a rim, a light top edge and a shadow tinted with your primary. With a mouse, hovering lifts them off their shadow. A horizontal drag stacks them over each other and releasing spreads them again; with touch the same drag works horizontally and vertical swipes still scroll the page.
The heading holds the text once, in a screen-reader-only copy. The tiles are a picture of it, marked aria-hidden, so the title is announced as written and only once. Choose the element with as (h1 to h4, p or div) so the document outline stays correct.
The visible tiles are select-none; the text can be read by assistive technology and found with the browser's search, but not selected on the page.
Text is foreground on a tile tinted from your primary and muted; measured text on tile contrast is above 10:1 in light and dark. The tile has a rim and a flat plate so its edge does not depend on the page background alone.
The component does not react to the keyboard and has no focusable part. The drag is a pointer gesture with no action behind it; nothing a person needs is only available by dragging.
In a group, mark the nav item of the current title with aria-current="location" (as in the demo). The group does not announce changes: scrolling is not an event worth reading aloud.
There is no key map: the title is not interactive. Scrolling by any means (keys, wheel, touch) drives the composition, and a controlled composed or a group value is driven by your own controls (links or buttons, reachable with Tab and activated with Enter).
With reduced motion the title is composed at once: one line, one pill, whatever the scroll position. There is no stagger, no crossing, no hover lift and no drag. With a controlled composed={false} it stays open and still, placed without motion. In a SplitLineGroup every title is shown composed; the group still reports the current title, and setting value jumps to it without smooth scrolling. Nothing disappears.
Only transforms animate during the movement; the corners of each tile also change radius as the tiles merge. There is no loop: the scroll moves the title.
Scroll is listened to once per instance, in the capture phase so a scrolling panel is heard as well as the page, with one requestAnimationFrame per burst of events. The listener is attached only while the title is within 200px of the viewport and the tab is visible; otherwise nothing runs.
A ResizeObserver measures the tiles. When the title wraps onto several lines each row moves less and sits half an em apart, so a narrow column does not break the layout. The box reserves the rest stagger above and below, so the layout does not shift while it moves.
A title that mounts in the middle band waits briefly in its open state and composes once.
A SplitLineGroup adds one passive scroll listener for all its titles, measured once per frame; a jump from value holds its target until the scroll has been still for 160 ms.
The tiles and their shadow are drawn with colors from your tokens (primary, muted, card, foreground); no extra variables are needed.
Technical sheet
Motion
calm
260 ms · bounce 0
lively
400 ms · bounce 0.3
playful
540 ms · bounce 0.45
Main spring of each temperament. Set it with the temperament prop or MotionKitProvider; the default is lively.
Size
Not measured yet · budget 15.0 kB gzip
Component and MotionKit helpers; excludes react, react-dom, motion.
Dependencies
motion · peer
Triggers
scroll, drag, entering the viewport
Reduced motion
Every title is shown composed as one pill with 1 px seams; no scroll stagger, crossing or drag compression. A SplitLineGroup still reports the current title and jumps to it without smooth scrolling.
Keyboard
No keyboard interaction of its own.
Browsers
Last 2 versions of Chrome, Edge, Firefox and Safari (iOS 16.4+)