Skip to main content

@react-x11/components

Components for react-x11 that do not belong in the core package — terminals, editors, calendars, a system tray

One import, one element

Importing a component is what teaches react-x11 its element, so there is no setup call to remember and no registration to run at startup — and a bundler drops every component an app does not name.

Nothing here is a hard dependency, either. A machine with no terminal emulator and no media player is an ordinary state of a healthy machine, so each of those is a status, a fallback and an error that names what it looked for — never a throw out of render.

import { Terminal } from '@react-x11/components';

<Terminal
command={['bash', '-lc', 'npm test']}
onExit={({ code }) => setPassed(code === 0)}
style={{ flexGrow: 1 }}
/>;

What is in the box

An embedded xterm, or a VT this package draws itself — one prop apart. Bring your own pty and it runs over ssh.

Highlighting, completion, undo, LSP-shaped diagnostics. Languages plug in three ways, none of them bundled.

GFM for streamed model output: every instant renders clean, and text selects across every block.

A month grid, single or range, any day blockable — and a hook that reads the desktop’s real calendars.

mpv or VLC in a window you lay out, driven over its own IPC socket rather than respawned.

Be the system tray. Takes the selection, broadcasts MANAGER, and applications dock themselves.