NSH / OMARCHY

Omarchy components for Native Shell apps, in Rust and TSX.
Built on nsh-base. Guided by Omarchy Style.

One nshm · Rust and TSX · MIT licensed

Every control a desktop app needs.

Each one is a single Rust component: Rust calls its constructor, TSX imports the same component. The API reference lists every prop, shorthand and event.

Actions

  • Button
  • IconButton
  • ButtonGroup
  • Toggle
  • ToggleGroup
  • Link

Choices

  • Checkbox
  • Switch
  • RadioGroup + Radio
  • Slider
  • Progress

Fields

  • Input
  • Textarea
  • NumberInput
  • OtpInput
  • Select
  • Combobox
  • Calendar
  • DatePicker
  • ColorPicker
  • Field

Navigation

  • Tabs + Tab
  • Sidebar + SidebarSection + SidebarItem
  • Accordion + AccordionItem
  • Collapsible
  • Pagination
  • Menu
  • ContextMenu
  • MenuItem
  • MenuSeparator
  • MenuLabel
  • TitleBar

Overlays

  • Dialog
  • AlertDialog
  • Sheet
  • Popover
  • HoverCard
  • Tooltip
  • Toaster
  • toast()
  • confirm()

Data

  • Table (+ TableHeader, TableBody, TableRow, TableHead, TableCell)
  • DataTable
  • ListItem
  • Tree
  • Scrollbar
  • ResizablePanelGroup + ResizablePanel
  • list() (Rust)

Display

  • Card
  • Panel
  • Separator
  • Badge
  • Keycap
  • Shortcut
  • Avatar
  • EmptyState
  • Icon
  • Heading
  • Title
  • Body
  • Caption
  • Code
  • Markdown

Charts

  • LineChart
  • AreaChart
  • BarChart
  • PieChart

Theme

  • Omarchy (TSX)
  • Theme
  • follow_system()
  • on_theme_change() (Rust)

Built on nsh-base.
Designed for Omarchy.

Omarchy is more than a palette: square corners, one accent, foreground-tinted state fills, a visible focus border and compact desktop type.

The colors follow the Omarchy theme the system uses and switch live when it changes. Without Omarchy, it draws Tokyo Night or Flexoki Light.

Native Shell — the platform
One app in Rust, TSX or both, drawn with each platform's own views on one Rust engine: macOS, Linux, Windows, iOS, Android and the web.
nsh-base — the behavior
Focus, keyboard, popups and accessibility, with no look of its own. nsh-omarchy is the presentation on top of it.
nshm — one package for both languages
The library is one Rust crate. A Rust app depends on it; a TSX app installs it with nsh add and imports it from "nsh-omarchy".
Omarchy Style — the design language
Square geometry, outlined actions and keyboard-first controls, read from the system's Omarchy palette.

Add it to your app.

In an NSH app's directory, add the nshm. It lists the module in nsh.json, and a Rust app also gets the crate in Cargo.toml.

Terminal
nsh add nsh-omarchy

Import the components from "nsh-omarchy". Props and events are the Rust names in camelCase.

App.tsxTSX
import { mount, signal, View } from "nsh";
import { Body, Button, Omarchy, Panel, Switch, Toaster, toast } from "nsh-omarchy";

function App() {
  // Draw with the system's Omarchy theme, and follow it as it changes.
  Omarchy.followSystem();
  const notify = signal(true);
  const saved = signal(0);
  const save = () => {
    saved.set(saved() + 1);
    toast({ title: "Settings saved" });
  };
  return (
    <View class="flex-1 gap-4 p-6 bg-background">
      <Panel title="Settings">
        <Switch label="Notifications" checked={notify()} onChange={({ checked }) => notify.set(checked)} />
        <Button label="Save" variant="primary" onPress={save} />
      </Panel>
      <Body>{`Saved ${saved()} times`}</Body>
      <Toaster />
    </View>
  );
}

mount(() => <App />);

Read the API reference · Read the README · crates.io