KQ-1182 · PLATEN/PRINT
Platen Print
A status line printed by a platen press: a small head rides a rail over a strip of card stock, and for each letter its plunger falls with the letter, which squashes onto its baseline and springs back on springs.snap while the carriage steps on a stiff spring, every impression a little uneven in density, tilt and inking. A rested phrase is wiped to a ghost as the carriage returns on springs.glide and the next prints over it; hovering or focusing slows the press on springs.drift so each strike reads. The strip is a real button — a press, a tap, Enter or Space strikes the next letter by hand, and on a finished line sends the carriage home — and each phrase is announced once.
Fieldline Health · specimen FH-2207
Printing your lab label
printing · 1 of 3 · press to strike a letter
Install
One command — the source lands in your repo. Or copy it from the Code tab.
$ pnpm dlx shadcn@latest add @kinetiq/platen-print
Props
- phrases
- string[]
- default —
- The status phrases, printed one after another and cycled in order.
- active
- boolean
- default true
- Printing. False wipes the line, prints doneText and stops every timer.
- doneText
- string
- default —
- What stays printed once inactive. Defaults to the last phrase.
- speed
- number
- default 1
- How fast the press strikes, rests and returns, 0.5 to 2.
- pressure
- number
- default 0.6
- How hard the platen strikes, 0 (a kiss) to 1 (a bite): the drop, the squash, ink squeezed at the edges, the deboss, how even the ink lies and the weight of the thock.
- ink
- "black" | "red" | "blue"
- default "black"
- The pigment on the letters and on the plunger's face.
- sound
- boolean
- default false
- Play the strikes the visitor makes: a thock at contact with the escapement's click, and a lower click for a carriage return asked for by hand. The press's own rhythm is silent.
- disabled
- boolean
- default false
- The line prints on its own but cannot be struck by hand.
- onPhraseChange
- (index: number) => void
- default —
- A phrase began: its index in phrases, or -1 for doneText. Also reported on the first commit.
- className
- string
- default —
- Classes for the root; it is w-full by default.
| Prop | Type | Default | Description |
|---|---|---|---|
| phrases | string[] | — | The status phrases, printed one after another and cycled in order. |
| active | boolean | true | Printing. False wipes the line, prints doneText and stops every timer. |
| doneText | string | — | What stays printed once inactive. Defaults to the last phrase. |
| speed | number | 1 | How fast the press strikes, rests and returns, 0.5 to 2. |
| pressure | number | 0.6 | How hard the platen strikes, 0 (a kiss) to 1 (a bite): the drop, the squash, ink squeezed at the edges, the deboss, how even the ink lies and the weight of the thock. |
| ink | "black" | "red" | "blue" | "black" | The pigment on the letters and on the plunger's face. |
| sound | boolean | false | Play the strikes the visitor makes: a thock at contact with the escapement's click, and a lower click for a carriage return asked for by hand. The press's own rhythm is silent. |
| disabled | boolean | false | The line prints on its own but cannot be struck by hand. |
| onPhraseChange | (index: number) => void | — | A phrase began: its index in phrases, or -1 for doneText. Also reported on the first commit. |
| className | string | — | Classes for the root; it is w-full by default. |