Component packs › Snippet › Length Budget

Length Budget

Each length limit is a ring and a pin dropped into the text where it ends; pick one to shade what falls past it.

Length Budget is an input from Snippet, a component pack with 7 preview components: Seven preview components that show how a page or post will look before it goes out, measured, not guessed. Price: $2 for the whole pack.

Built with: in-text pins, grapheme count, limit rings.

Code: React and Next.js (TypeScript), Vue 3, plain HTML/CSS/JS, Tailwind CSS v4 and Motion (motion.dev). No npm packages needed. Keyboard accessible, with a reduced-motion version, in dark and light.

Length Budget props

PropTypeDefaultDescription
darkboolean
autoplayboolean
valuestring
limits[string, number][]name, characters
onChange(v: { count: number; over: string[] }) => void

Methods on the ref

Use it in React

import LengthBudget from './LengthBudget';

<LengthBudget />

The Vue, HTML, Next.js, Tailwind and Motion versions take the same options.

More in Snippet

Good for: SEO and social preview components.