Control panels · component · 16K

Device picker

A device chooser in the spirit of the early-'90s Chooser: device types as a scrolling column of 32×32 icons, the named devices of the chosen type in a list ("Select a printer:"), Background Printing and Network Active / Inactive switches and a small version string. Data-driven, with original printer, network-printer and file-server icons.

Both panes are ARIA listboxes (one Tab stop each, arrow keys, Home/End, type-ahead). onSelect(device, type) fires when a device is chosen, onOpen on Enter or double-click. Background Printing only shows for types with backgroundPrinting: true. Every string, including each type's prompt, is data or a label prop.

Install

pnpm dlx shadcn@latest add @s7ui/device-picker

Example

This example also uses @s7ui/window.

Desk Printer
Laser Printer
File Sharing

Select a printer:

Lobby Laser
Studio Proofs
Second Floor
Workshop (offline)
Version 1.0
Background Printing:
Network:

Nothing chosen yet.

Info

Files:
components/retro/device-picker.tsx
Uses:
@s7ui/theme, @s7ui/bitmap, @s7ui/label, @s7ui/list-box, @s7ui/radio-group, @s7ui/scroll-area, @s7ui/file-view-lib
Packages:
—