KQ-789 · SEED/LOCK
Seed Lock
A seed field with a lock. A rolling readout sits over a real mono input, so a new seed rolls into place digit by digit on snap while the input keeps the value for forms and assistive technology. The lock's shackle closes on flick, turning the field read-only and settling the regenerate control's randomness dots to one faint grey; unlocking opens the shackle and rolls a new seed at once, derived from the old one by an integer hash so server and client agree. Typing edits the seed directly.
KQ-789 · SEED/LOCK
Open
Seed 48213907 · Open · "Harbourlight"
Install
One command — the source lands in your repo. Or copy it from the Code tab.
$ pnpm dlx shadcn@latest add @kinetiq/seed-lock
Props
- value / defaultValue
- string
- default "48213907"
- Controlled or initial seed, digits only.
- onValueChange
- (seed: string, reason: "typed" | "rolled") => void
- default —
- Fires from a keystroke, an unlock or the regenerate control.
- locked / defaultLocked
- boolean
- default false
- Controlled or initial lock state.
- onLockedChange
- (locked: boolean) => void
- default —
- Fires from the lock switch.
- maxDigits
- number
- default 9
- Longest seed the field accepts.
- label
- string
- default —
- Names the field.
| Prop | Type | Default | Description |
|---|---|---|---|
| value / defaultValue | string | "48213907" | Controlled or initial seed, digits only. |
| onValueChange | (seed: string, reason: "typed" | "rolled") => void | — | Fires from a keystroke, an unlock or the regenerate control. |
| locked / defaultLocked | boolean | false | Controlled or initial lock state. |
| onLockedChange | (locked: boolean) => void | — | Fires from the lock switch. |
| maxDigits | number | 9 | Longest seed the field accepts. |
| label | string | — | Names the field. |