Control panels · component · 17K

General Controls

A General Controls panel: the desktop-pattern editor, Rate of Insertion Point Blinking (Slow / Medium / Fast, with a blinking caret preview), Menu Blinking (Off / 1 / 2 / 3, with a sample item that blinks) and the time and date. One controlled value with onChange.

The pattern changes on "Set Desktop"; the radio groups change at once. Time and date are display only, rendered on the client (empty on the server, so no hydration mismatch) in the browser's locale; pass `locale`, `hour12` or a fixed `now`. The caret and menu previews are decorative and stay still under prefers-reduced-motion. INSERTION_POINT_BLINK_MS gives the half-period for each rate if you want your own fields to follow it.

Install

pnpm dlx shadcn@latest add @s7ui/general-controls

Example

This example also uses @s7ui/desktop @s7ui/window.

Desktop Pattern

Gray, 32 of 64 dots

Arrow keys move, Space turns a dot on or off.

Rate of Insertion Point Blinking

Menu Blinking

Time

Date

Info

Files:
components/retro/general-controls.tsx
Uses:
@s7ui/theme, @s7ui/control-panel, @s7ui/pattern-editor, @s7ui/bitmap, @s7ui/label, @s7ui/radio-group
Packages:
—