HYPR TILING
hypr-tiling
dynamic tiling · for react

Rearrange the interface, at runtime.

hypr-tiling is a dynamic tiling layout engine for React: a recursive split-tree renderer that lets users drag, drop, resize, group, maximize, and keyboard-control resizable panes at runtime, with a theming engine and self-healing drag recovery — inspired by the Hyprland Wayland compositor.

Reach for it where users live inside dense, multi-panel screens — IDE-like tools, trading and operator consoles, analytics dashboards — and your app keeps strict, controlled ownership of the layout state.

This page is a hypr-tiling layout. Every section is a real pane: focus it, drag its header, resize the dividers, maximize it — or drive it from the live controls pane.

Open the full interactive showcase
features

Features

Recursive split-tree layout
A layout is a tree of leaf, split, and group nodes. Binary splits carry a ratio and an axis; the renderer is a controlled component driven by your layout state.
Drag-and-drop tiling
Hyprland-style live drag: the source detaches, the tree freezes, a cursor-following ghost hops between seats, and the move commits on release — resolving to swap, edge-insert, split-container-insert, or group-merge.
Resize & sizing modes
Drag split dividers, or pin a pane to a measured pixel extent per dimension (static) versus ratio-distributed (flexible). Panes can acquire space directionally.
Master / stack layout
Any subtree can switch to a master-area-plus-stack arrangement with a configurable master count and orientation — the classic tiling-WM master layout.
Tabbed grouping
Collapse several leaves into one slot as a stacked group with a tab strip; only the active member renders and is hit-tested.
Full keyboard control
Directional focus, a pane switcher (cycle / jump / overlay), maximize, keyboard move-mode, and master/group commands — all behind a remappable keymap and a typed command API.
Theming engine
Built-in themes, eight accent hues, a theme provider with hooks, and live theme switching with no remount. This page ships a bespoke mosaic theme.
Self-healing drag recovery
A frame-deadline animation backstop, an idle watchdog, transient-style teardown, and a visibilitychange reconcile guarantee a drag never strands the tree mid-transition.
model & kudos

The model

A layout is a plain, serialisable tree: leaf nodes hold a tile, split nodes divide space along an axis by a ratio, and group nodes stack leaves behind tabs. You hold the tree in state; the renderer projects it to pixels, runs the interaction, and reports every edit back — nothing is hidden inside the component. It is yours to persist, diff, and restore.

Kudos to Hyprland

The interaction model is inspired by Hyprland, the dynamic-tiling Wayland compositor, and its tiling-first philosophy: detach-and-drop movement, master/stack layouts, and keyboard-driven focus. Kudos to its maintainers and contributors for advancing modern tiling workflow design.

install

Install & integrate

Add the scoped package and its React peers. The library targets react and react-dom version 19.

pnpm add @n-uf/hypr-tiling react react-dom

The renderer is a controlled component: you own the layout tree in state and apply every change it reports through onLayoutChange.

import {
  DynamicTilingRenderer,
  DEFAULT_TILING_LAYOUT_CONFIG,
  type DynamicLayoutNode,
  type DynamicTile,
} from "@n-uf/hypr-tiling";
import { useState } from "react";

const tiles: DynamicTile[] = [
  { id: "a", title: "editor", content: <Editor /> },
  { id: "b", title: "preview", content: <Preview /> },
];

const initialLayout: DynamicLayoutNode = {
  kind: "split", id: "root", axis: "vertical", ratio: 0.5,
  first: { kind: "leaf", id: "l", tileId: "a" },
  second: { kind: "leaf", id: "r", tileId: "b" },
};

export function Workspace() {
  const [layout, setLayout] = useState(initialLayout);
  return (
    <DynamicTilingRenderer
      layout={layout}
      tiles={tiles}
      config={DEFAULT_TILING_LAYOUT_CONFIG}
      onLayoutChange={setLayout}
    />
  );
}
seo + llm

SEO & LLM friendly

Tiling does not have to cost discoverability. Every pane body is real semantic markup — headings, paragraphs, lists, code — emitted into the document, never painted onto a canvas or hidden behind a transform. All panes render at once, so unfocused sections stay in the DOM.

Because the content lives in the DOM, it prerenders. This homepage ships its full text in the initial static HTML, with the interactive tiling layered on as progressive enhancement — so crawlers and LLM assistants that fetch and cite docs read the real content without running JavaScript. A /llms.txt mirror is served for the same reason.

live controls

Live controls

Click a control to run the real tiling command on the focused pane — the same typed command API the keyboard layer drives. Only controls that are actionable right now are shown.

focus
window
layout
group