@tarve/core 0.13.8 Windows x64 · Linux x64 · Android Apache-2.0

# TSX in. Pixels out. *No* ~~browser~~ between.

Tarve is a desktop UI toolkit for Bun. You write components in TSX; a Rust runtime lays them out, shapes the text and paints the window. There is no web view underneath.

[Documentation](https://tarve.dev/docs.md) [Try a demo app](https://github.com/omarcosr/youtube-music/releases/latest)

```tsx title="app.tsx"
import { Button, Column, Text, Window, createApp } from "@tarve/core";

let count = 0;

function App() {
  return (
    <Window title="Counter" width={520} height={360}>
      <Column flex={1} align="center" justify="center" gap={16}>
        <Text size={42} weight={700}>{count}</Text>
        <Button onClick={() => count++}>Increase</Button>
      </Column>
    </Window>
  );
}

const app = createApp(App);
await app.ready;
await app.closed;
```

*Fig. 1 The program on the left, running in this page*

Not a screenshot and not HTML. This is Tarve's native layout, text and paint code compiled to WebAssembly, drawing into a canvas. It paints only when you click.

## Specification

- **Runtime**: **Bun 1.4+, Node.js 26.10+, txiki.js, Go** TypeScript and TSX run directly, no build step in development
- **Platforms**: **Windows x64, Linux x64, Android** desktop runtimes ship inside the npm package; APK and AAB from tarve build
- **Layout**: **Taffy** retained Flexbox and Grid, updated incrementally
- **Text**: **Parley** shaping, selection, IME composition, Unicode editing
- **Rendering**: **D3D11 / DXGI, Vello / WGPU, vello_cpu** chosen per machine, with fallbacks
- **Accessibility**: **AccessKit** UI Automation on Windows, AT-SPI on Linux, TalkBack on Android
- **Components**: **99** each with a reference page and a live example
- **Frames while idle**: **0** nothing is presented until something changes
- **Output**: **One executable** per target, runtime embedded, cross-compiled; deb, tar.gz, zip and MSIX via tarve package
- **Tooling**: **create-tarve, @tarve/router, @tarve/test** scaffolding, navigation, headless tests and a visual inspector
- **Not included**: **Chromium, the DOM, a CSS engine, React**
- **License**: **Apache-2.0**

## What happens on a click

Six stages between an event handler and the screen. Each one does nothing until the one before it hands over work.

1. ### TSX

   `Bun`

   A view is a function that returns TSX, compiled against Tarve's own JSX runtime. React is not involved.

2. ### Diff

   `Bun`

   The reconciler compares the new tree with the last one and keeps only the nodes that changed.

3. ### Bridge

   `Bun → Rust`

   The mutations cross to the native runtime once. Nothing polls; both sides sleep between events.

4. ### Layout

   `Taffy`

   Flexbox and Grid on a retained tree, so a changed label does not re-measure the whole window.

5. ### Text

   `Parley`

   Shaping, line breaking, selection and IME composition for every Text, Input and TextArea.

6. ### Paint

   `D3D11 · Vello · CPU`

   The damaged region is painted and presented. Then the window goes quiet again.

## In the box

- **Text editing**: Selection, clipboard with text, files and images, IME composition, undo and redo, grapheme-aware cursor movement.
- **Rich content**: Markdown, syntax-highlighted Code and Diff are native leaves, so a 10,000-line file is one node, not 10,000.
- **Long lists**: VirtualList with fixed, measured or externally windowed rows.
- **Accessibility**: Every control is exposed through AccessKit to UI Automation on Windows and AT-SPI on Linux.
- **Desktop APIs**: Global hotkeys, native file dialogs, custom title bars, window positioning, close interception.
- **Development**: Error overlay inside the window, same-window remount under bun --hot, and a frame-time graph.
- **Themes**: Light and dark token sets in the shape of shadcn/ui, swappable at runtime without recreating the window.
- **Testing**: @tarve/headless renders any view to pixels or queries it by role, with no window, GPU or native binary.

## Renderers

`createApp` takes `renderer: "auto" | "gpu" | "cpu"`. Windows uses D3D11/DXGI with a Vello/WGPU fallback, Linux uses Vello/WGPU, and both have a low-memory CPU path. Pick a combination to see the order Tarve tries them in.

1. D3D11 / DXGI in use
2. Vello / WGPU standby
3. vello_cpu + softbuffer standby

D3D11/DXGI with a Vello/WGPU fallback for initialization or recovery failures. If Vello cannot run on the adapter, it falls back to CPU.

## Styling

Style objects read like CSS: gradients, `boxShadow`, `textShadow`, `transform` and transitions on hover, focus and updates. They are interpreted natively and look the same on D3D11, Vello and the CPU renderer.

```tsx title="card.tsx"
<Column style={{
  background: "linear-gradient(180deg, #fbfaf6, #ece8dc)",
  borderColor: "#15140f",
  borderWidth: 1,
  radius: 4,
  boxShadow: { y: 1, blur: 2, color: "#15140f1f" },
  hover: {
    transform: "translateY(-2px)",
    boxShadow: { y: 10, blur: 24, color: "#15140f2e" },
  },
  transition: { all: { duration: 180, easing: "easeOut" } },
}} />
```

## Index of components

99 components, all exported from `@tarve/core`. Each name opens its reference page with a live example.

### Window & layout

- [Window](https://tarve.dev/docs/components/Window.md)
- [TitleBar](https://tarve.dev/docs/components/TitleBar.md)
- [View](https://tarve.dev/docs/components/View.md)
- [Row](https://tarve.dev/docs/components/Row.md)
- [Column](https://tarve.dev/docs/components/Column.md)
- [Scroll](https://tarve.dev/docs/components/Scroll.md)
- [ScrollArea](https://tarve.dev/docs/components/ScrollArea.md)
- [Overflow](https://tarve.dev/docs/components/Overflow.md)
- [Portal](https://tarve.dev/docs/components/Portal.md)
- [Pressable](https://tarve.dev/docs/components/Pressable.md)
- [Resizable](https://tarve.dev/docs/components/Resizable.md)
- [AspectRatio](https://tarve.dev/docs/components/AspectRatio.md)
- [Direction](https://tarve.dev/docs/components/Direction.md)
- [Separator](https://tarve.dev/docs/components/Separator.md)
- [AnimatePresence](https://tarve.dev/docs/components/AnimatePresence.md)
- [Glass](https://tarve.dev/docs/components/Glass.md)

### Text & media

- [Text](https://tarve.dev/docs/components/Text.md)
- [Typography](https://tarve.dev/docs/components/Typography.md)
- [Link](https://tarve.dev/docs/components/Link.md)
- [Label](https://tarve.dev/docs/components/Label.md)
- [Kbd](https://tarve.dev/docs/components/Kbd.md)
- [Image](https://tarve.dev/docs/components/Image.md)
- [Avatar](https://tarve.dev/docs/components/Avatar.md)
- [Icon](https://tarve.dev/docs/components/Icon.md)
- [Svg](https://tarve.dev/docs/components/Svg.md)
- [Path](https://tarve.dev/docs/components/Path.md)
- [Circle](https://tarve.dev/docs/components/Circle.md)
- [Ellipse](https://tarve.dev/docs/components/Ellipse.md)
- [Line](https://tarve.dev/docs/components/Line.md)
- [Polyline](https://tarve.dev/docs/components/Polyline.md)
- [Polygon](https://tarve.dev/docs/components/Polygon.md)
- [SvgRect](https://tarve.dev/docs/components/SvgRect.md)

### Inputs & forms

- [Input](https://tarve.dev/docs/components/Input.md)
- [TextArea](https://tarve.dev/docs/components/TextArea.md)
- [InputGroup](https://tarve.dev/docs/components/InputGroup.md)
- [InputOTP](https://tarve.dev/docs/components/InputOTP.md)
- [Field](https://tarve.dev/docs/components/Field.md)
- [Checkbox](https://tarve.dev/docs/components/Checkbox.md)
- [Switch](https://tarve.dev/docs/components/Switch.md)
- [RadioGroup](https://tarve.dev/docs/components/RadioGroup.md)
- [Select](https://tarve.dev/docs/components/Select.md)
- [NativeSelect](https://tarve.dev/docs/components/NativeSelect.md)
- [Combobox](https://tarve.dev/docs/components/Combobox.md)
- [Slider](https://tarve.dev/docs/components/Slider.md)
- [Toggle](https://tarve.dev/docs/components/Toggle.md)
- [ToggleGroup](https://tarve.dev/docs/components/ToggleGroup.md)
- [Calendar](https://tarve.dev/docs/components/Calendar.md)
- [DatePicker](https://tarve.dev/docs/components/DatePicker.md)

### Actions & feedback

- [Button](https://tarve.dev/docs/components/Button.md)
- [ButtonGroup](https://tarve.dev/docs/components/ButtonGroup.md)
- [Badge](https://tarve.dev/docs/components/Badge.md)
- [Progress](https://tarve.dev/docs/components/Progress.md)
- [Spinner](https://tarve.dev/docs/components/Spinner.md)
- [Skeleton](https://tarve.dev/docs/components/Skeleton.md)
- [Alert](https://tarve.dev/docs/components/Alert.md)
- [Toast](https://tarve.dev/docs/components/Toast.md)
- [Toaster](https://tarve.dev/docs/components/Toaster.md)
- [Empty](https://tarve.dev/docs/components/Empty.md)

### Overlays

- [Modal](https://tarve.dev/docs/components/Modal.md)
- [Dialog](https://tarve.dev/docs/components/Dialog.md)
- [AlertDialog](https://tarve.dev/docs/components/AlertDialog.md)
- [Sheet](https://tarve.dev/docs/components/Sheet.md)
- [Drawer](https://tarve.dev/docs/components/Drawer.md)
- [Popover](https://tarve.dev/docs/components/Popover.md)
- [Flyout](https://tarve.dev/docs/components/Flyout.md)
- [Tooltip](https://tarve.dev/docs/components/Tooltip.md)
- [HoverCard](https://tarve.dev/docs/components/HoverCard.md)
- [DropdownMenu](https://tarve.dev/docs/components/DropdownMenu.md)
- [ContextMenu](https://tarve.dev/docs/components/ContextMenu.md)
- [Command](https://tarve.dev/docs/components/Command.md)
- [CommandPalette](https://tarve.dev/docs/components/CommandPalette.md)

### Navigation

- [Tabs](https://tarve.dev/docs/components/Tabs.md)
- [Accordion](https://tarve.dev/docs/components/Accordion.md)
- [Collapsible](https://tarve.dev/docs/components/Collapsible.md)
- [Breadcrumb](https://tarve.dev/docs/components/Breadcrumb.md)
- [Pagination](https://tarve.dev/docs/components/Pagination.md)
- [NavigationMenu](https://tarve.dev/docs/components/NavigationMenu.md)
- [Menubar](https://tarve.dev/docs/components/Menubar.md)
- [AppMenuBar](https://tarve.dev/docs/components/AppMenuBar.md)
- [Sidebar](https://tarve.dev/docs/components/Sidebar.md)
- [Carousel](https://tarve.dev/docs/components/Carousel.md)

### Data display

- [Card](https://tarve.dev/docs/components/Card.md)
- [Item](https://tarve.dev/docs/components/Item.md)
- [List](https://tarve.dev/docs/components/List.md)
- [VirtualList](https://tarve.dev/docs/components/VirtualList.md)
- [Table](https://tarve.dev/docs/components/Table.md)
- [DataTable](https://tarve.dev/docs/components/DataTable.md)
- [DataGrid](https://tarve.dev/docs/components/DataGrid.md)
- [TreeView](https://tarve.dev/docs/components/TreeView.md)
- [Chart](https://tarve.dev/docs/components/Chart.md)

### Rich content

- [Markdown](https://tarve.dev/docs/components/Markdown.md)
- [Code](https://tarve.dev/docs/components/Code.md)
- [Diff](https://tarve.dev/docs/components/Diff.md)

### App & chat

- [Message](https://tarve.dev/docs/components/Message.md)
- [Bubble](https://tarve.dev/docs/components/Bubble.md)
- [MessageScroller](https://tarve.dev/docs/components/MessageScroller.md)
- [Marker](https://tarve.dev/docs/components/Marker.md)
- [Attachment](https://tarve.dev/docs/components/Attachment.md)
- [Questionnaire](https://tarve.dev/docs/components/Questionnaire.md)

## Shipping

`tarve build` compiles the app into one executable with the native runtime embedded. The npm package already carries the Windows and Linux runtimes, so either target builds from either machine without a Rust toolchain.

```sh
# Windows → .exe with the native runtime embedded
bun run tarve build app.tsx --outfile dist/App.exe

# cross-compile for Linux x64, no Rust toolchain needed
bun run tarve build app.tsx --target linux-x64 --outfile dist/App
```

---

Tarve v0.13.8 · HTML version: https://tarve.dev/ · Index for agents: https://tarve.dev/llms.txt
