@ritsuki.kagerou/crt-ui
CRT terminal components for Svelte 5 — SSR-safe, token-driven, reduced-motion aware.
pnpm add @ritsuki.kagerou/crt-ui
<script>
import '@ritsuki.kagerou/crt-ui/tokens.css';
import { Typed, Crt } from '@ritsuki.kagerou/crt-ui';
</script>DECRYPTING PERSONAL LOG ... OK
the caret holds when the line is done
Server-renders the finished line, so hydration never mismatches. Typing starts after
hydration; under prefers-reduced-motion the line appears at once.
Meter
Takes a 0–1 fraction, not a category — the consumer decides what a tier means. Exposed to
assistive tech as role="meter".
CRT/UI 0.1.0
- CRT/UI — BIOS 00.01
Lines chain through Typed's oncomplete; the stepped bar closes the
sequence. skippable is off here so the demo cannot be ended by a stray key press.
ScreenFrame
- C-01 BACKEND & API
- C-02 INFRASTRUCTURE
- C-03 DATABASE
Content is a snippet; title, code, footer and the back label are plain text props. Drop onback to render the frame without a back control.
Crt
SIGNAL LOCKED
this box has its own tube, scoped with position="absolute"
Pointer-transparent and aria-hidden. Mounted once in the root layout it covers
the viewport; with position="absolute" it covers the nearest positioned ancestor instead.
Tokens
--crt-bg#000000 page / tube background--crt-phos#4ade80 base phosphor colour--crt-phos-hot#d5ffe6 emphasis (titles, values)--crt-phos-midrgba(…, .62) secondary text--crt-phos-dimrgba(…, .4) labels, footers--crt-phos-faintrgba(…, .16) unlit meter cells--crt-bar#1ee07c lit meter / progress cells--crt-rulergba(…, .26) hairlines and borders--crt-displayvar(--crt-mono) display face for titles--crt-sweep-duration7.5s beam pass period--crt-scanline-gap3px scanline pitch--crt-cell-width6px meter cell width
Every component also carries these values inline as fallbacks, so the package renders
correctly even if tokens.css is never imported.