A new layout primitive for React apps

Split any part of your app into adaptive tiling panes, from two side by side to over a dozen in rows, columns and tabs. You describe each pane once; your users arrange them the way they work, on any screen.

npm install jali-layout
  • Click an order, and the detail follows
  • Drag a pane onto another
  • Right-click an order for more
  • Point at a box to find its pane
  • Drag a divider
  • Close a pane

Quickstart

The quickstart app, in three files

One kind of pane, the note it opens on, and the view. The panes beside the code are that code, running: click a note's button to open the next.

import { definePane } from "jali-layout/react";​export const note = definePane("note", {  params: { id: Number },  title: ({ id }) => `Note ${id}`,​  Component: ({ params, openBeside }) => (    <article className="note">      <h3>Note {params.id}</h3>      <button onClick={() => openBeside(note({ id: params.id + 1 }))}>        Open the next note beside      </button>    </article>  ),});

What you get

What Jali does for you

  1. Panes fold when room runs out

    Each kind of pane declares the narrowest width it works at. Drag the frame's edge: below that width a pane folds into a tab, and it comes back when there is room.

    How a layout fits
    0px wide

    Drag the frame's edge, or watch it fold.

  2. The detail follows the list

    A detail opened from a list follows it: pick another row, and the detail shows that one in the same place. Keep the detail to hold it on one record, and the next row you open appears beside it, to compare.

    Following a list
    Following

    Order 1048 shows the order selected in Orders. Pick another order: it changes in place, and its customer with it.

  3. Every command has a key

    Move focus, maximise, tuck, close and undo from the keyboard, and rebind or turn off any key. Click into the panes and press one: its key lights up below.

    Commands and keys
    KeysClick one, or press it in the panes above

    Settings are commands too

    A drop on a pane's middleCtrl+KCtrl+D

    Drag a pane onto another's middle: the two trade places.

Examples

Jali does the layout. The looks are all yours

Keep Jali's default theme, change a few CSS variables, or restyle every surface using any styling system. Your CSS wins over Jali's, no !important needed.

Data Studio, runningData Studio, running
Loan review, runningLoan review, running
Markets, running
Studio, runningStudio, running
Trips, runningTrips, running
Handshake, running

01 / 06Data Studio

A database browser where the person builds the layout: tables, records, related records, SQL queries and charts, each in a pane.

← → or 1–6 to switch

One package: jali-layout

One install. The core has no framework, jali-layout/react renders it, and the styles come in a layer of their own.

npm install jali-layout
jali-layoutNo dependencies. jali-layout/react needs React 18.2+.
  • import { createJali, row, column, tabs } from "jali-layout";

    The layout tree and every change to it: fitting, focus, undo, following and unsaved work.

    jali-layout
  • import { JaliRoot, definePane, usePane } from "jali-layout/react";

    Panes, dividers, tabs, the shelf and the command palette, as components and hooks.

    jali-layout/react
  • import "jali-layout/styles.css";

    A default theme read from --jali-* tokens, in its own cascade layer, so your Tailwind or CSS wins without !important.

    Theming