← Projects

HookedIn

LinkedIn shows the first three lines of a post, then a “… more” link. Those lines decide whether anyone reads the rest. I built HookedIn to show exactly where LinkedIn will cut a draft, inside a feed of other posts, before I publish it.

Role
Solo builder
Built
June 2026
Stack
React, TypeScript, Vite
Hosting
Vercel

Try HookedInSource on GitHub

The only preview was posting

I wanted to see my own hooks in the feed before anyone else did. LinkedIn's editor doesn't show where a post will be cut. The only way to check was to publish, find the post in the feed, and look. And I wanted to check two places: my phone and my Mac, where the cut lands in different spots.

Fixing a bad hook after it goes live isn't free either. I'd heard that LinkedIn shows a post to fewer people once it's edited. Since the hook decides whether anyone reads the rest, I wanted it right the first time.

The cut depends on one number

LinkedIn always cuts at three lines, so the only thing that moves the cut is the width of the text box. I measured LinkedIn's box from the live page: 526 pixels wide in full-screen Safari on a MacBook Air, with 14-pixel system text and 20-pixel lines.

HookedIn draws a box with the same width, font, and line height, so the browser wraps a draft at the same words LinkedIn does. LinkedIn changes these numbers without notice, so they live in one file that I re-check.

Making room for “… more”

The CSS that clamps text to three lines can only add a bare ellipsis. LinkedIn puts “… more” at the end of line 3, which pushes out the last word or two.

HookedIn measures the post with “… more” already attached, then runs a binary search for the longest start of the post that still fits in three lines. If the cut lands inside a word, it hides the whole word, the way LinkedIn does.

The same post can lose a whole paragraph on a phone. Below, the first sentence fits on one line at desktop width but wraps to two on an iPhone. The blank line after it takes line 3, so the second paragraph never shows.

A hook competes with the feed

A hook that reads well alone can still disappear between two louder posts. HookedIn places the draft in a feed of sample posts, in a desktop layout or a phone frame, and you can drag the feed's edge to see the cut change as it narrows.

Posts with links show a preview card. A small server function fetches the page's title and image. It checks the address at every redirect and refuses private or local ones, so a link can't use it to reach an internal network.