10 min read

How MasonryKit is built

How I split MasonryKit, a TypeScript library for masonry layouts, into three packages: pure layout math, DOM helpers, and a React hook. Plus the patterns in each layer worth borrowing for your own libraries.