PRO

Soft Type

Lettering you type into. Each character is traced from Nunito Black down to its centreline and rebuilt as a chain of particles, so letters press against each other, stretch when you drag them, and pop when you press and hold. The tracing works on any glyph the device can draw, from Latin and Cyrillic to Han and Hangul, and every counter stays open because each letter's pen only fattens until a hole would close. Emoji become soft circles. Canvas 2D, no dependencies.

Component
Install
npx shadcn@latest add @compronents/soft-type

Installs from ui.aryank.space. Needs a registry token and a one-time @compronents entry in components.json. The docs walk through both.

Files
Checking access…
API
PropTypeDefaultDescription
defaultValuestring"BLANK"Starting text when uncontrolled.
value / onValueChangestring / (value: string) => void—Controlled text and its change callback.
maxLengthnumber64Longest text in graphemes (user-perceived characters).
inkstring"#000000"Letter colour.
paperstring"#ffffff"Background, and the thin rim that keeps touching letters apart.
weightnumber1.2Pen weight relative to the font's own. Each letter stops where its counters would close.
squeezenumber1.05How much larger than their slots letters are built, so they sit pressed together.
breakWordsbooleantrueAllow breaking a word between letters when keeping it whole would make the letters 40% smaller or more, as in narrow boxes.
soundbooleantruePop and typing sounds.
fontFamily / fontWeightstring / number"Nunito", ui-rounded, system-ui, sans-serif / 1000Face the letters are traced from. A heavy rounded face gives the cleanest centrelines.
loadFontbooleantrueLoad Nunito from Google Fonts. Turn off when the font is already on the page.
autoFocusbooleanfalseFocus the hidden input on mount.
labelstring"Type to change the letters"Accessible name for the text input.
Customize
defaultValuetext

Starting text. Visitors replace it by typing.

ink / papercolor

Letter colour and background.

weightslider

How far pens fatten beyond the font, capped per letter.

squeezeslider

How tightly letters press against each other at rest.

Dependencies
None.