BluKavantUI Design system
PATTERNS

Navigate a workspace

Pair a stable hierarchy with a focused detail view.

NAVIGATE A WORKSPACE / IMPLEMENTATION RECIPE

Separate where you are from what you are editing.

Build an account workspace with a persistent account list, a resizable detail pane and a draft note per account. Switching accounts or hiding navigation does not erase the note.

Use this for repeated inspections within a stable workspace. If each destination is a separate task with a shareable URL, add application routing; Splitter itself is a layout component, not a router.

ACCOUNTSAtlas Labs ← activeNorthstarCedar & Co.
DETAILSAtlas Labs

Draft note: follow up Friday

drafts["atlas"]

Pane size, selected record and draft data are three separate pieces of state.

WORKING COMPOSITION

Independent account drafts plus a resizable, collapsible workspace.

Real BluKavantUI components, with a small application controller. Data and save responses are simulated in this page; reload resets the example.

Loading the interactive recipe…

Try this sequence
  1. Enter a private draft note for Atlas Labs.
  2. Select Northstar and type a different note; return to Atlas Labs. Its note remains.
  3. Hide accounts and show them again. The selected account and its note stay in place.
  4. Focus the separator and use its keyboard controls. On a narrow screen the panes stack vertically.
IMPLEMENT THE WORKFLOW

Build navigate a workspace into your application.

Splitter ↗

Resizes and collapses two supplied content areas.

Application navigation

Owns the active account, record loading and per-account drafts.

  1. Keep identity outside the pane

    Store ActiveAccountId in application state. Navigation changes that ID; the detail pane displays the associated record.

  2. Key drafts by record

    Use a map keyed by account ID. Save typing to that draft, not to a shared textarea value that gets reused for every account.

  3. Change visibility, not ownership

    Collapse the pane without discarding the selected record or replacing the draft store. Keep a visible Show accounts control.

  4. Adapt the layout

    The example switches Splitter.IsVertical at 640px. For a full mobile workflow, use separate list/detail routes or a navigation Drawer, while retaining the same selected ID and draft store.

State / contractImplementation
Selected recordactiveAccountId: string. Route or local Screen variable; unrelated to the pane percentage.
Draft storeMap<accountId, note>. This example is memory-only for the current visit. Decide explicitly whether production drafts survive navigation or reload.
Layout statePrimarySize and IsCollapsed. LayoutChanged reports both; persist only if restoring the preference is useful.
Async detail loadingCancel or ignore responses for an account that is no longer active. Never put Northstar’s late response into Atlas’s pane.

Web implementation

Call mount(host, accounts). The recipe creates both content nodes once and keeps the textarea mounted. Its draft Map belongs to the consumer function. The returned destroy() removes the component and the media-query listener; move drafts into your route/store layer if they must outlive this screen.

Install Community and the required Pro add-on for Grid or Kanban recipes, import @blukavantui/community/styles.css, and use a connected host element. The companion CSS styles the surrounding fields, navigation and status messages.

Keep the recipe and shared.ts together; TypeScript resolves the recipe’s ./shared.js import. Add class="recipe-demo" to your host. Supply your records and backend callback as the mount arguments. The downloads use Community 1.0.0 and Pro 1.0.0 imports; the live demo retains its previously verified SDK 0.9.0 runtime.

View the TypeScript recipe
import { createSplitter } from '@blukavantui/community/splitter';
import { node, button, status } from './shared.js';
export interface Account { id: string; name: string; summary: string }
export function mount(host: HTMLElement, accounts: Account[]) {
  if (!accounts.length) throw new Error('Supply at least one account.');
  const navigation = node('nav', '', 'recipe-navigation'); navigation.setAttribute('aria-label', 'Accounts');
  const detail = node('section', '', 'recipe-detail'), heading = node('h3');
  const summary = node('p'), label = node('label', 'Private draft note'), note = node('textarea');
  note.rows = 4; label.append(note); detail.append(heading, summary, label);
  const toolbar = node('div', '', 'recipe-toolbar'), panes = node('div'); host.append(toolbar, panes);
  const message = status(host);
  // Keep record drafts in application state, separate from pane size and visibility.
  const drafts = new Map<string, string>(); let active = accounts[0].id, collapsed = false;
  const mobile = matchMedia('(max-width: 640px)');
  const splitter = createSplitter(panes, {
    PrimaryContent: navigation, SecondaryContent: detail, PrimarySize: 30,
    MinPrimarySize: 20, MaxPrimarySize: 65, IsCollapsible: true,
    IsVertical: mobile.matches, Height: mobile.matches ? '610px' : '370px',
    PrimaryLabel: 'Accounts', SecondaryLabel: 'Account details',
  }, { LayoutChanged: (_size, isCollapsed) => { collapsed = isCollapsed; updateToggle(); } });
  const toggle = button('Hide accounts', () => { collapsed = !collapsed; splitter.update({ IsCollapsed: collapsed }); updateToggle(); });
  toolbar.append(toggle);
  function updateToggle() { toggle.textContent = collapsed ? 'Show accounts' : 'Hide accounts'; toggle.setAttribute('aria-expanded', String(!collapsed)); }
  function show(account: Account) {
    active = account.id; heading.textContent = account.name; summary.textContent = account.summary;
    note.value = drafts.get(active) || '';
    for (const el of navigation.querySelectorAll('button')) el.setAttribute('aria-current', el.dataset.key === active ? 'true' : 'false');
    message.textContent = `Viewing ${account.name}. Notes are temporary drafts for this visit.`;
  }
  for (const account of accounts) {
    const link = button(account.name, () => show(account)); link.dataset.key = account.id; navigation.append(link);
  }
  note.oninput = () => { drafts.set(active, note.value); };
  const resize = () => splitter.update({ IsVertical: mobile.matches, Height: mobile.matches ? '610px' : '370px' });
  mobile.addEventListener('change', resize); show(accounts[0]); updateToggle();
  return { destroy() { mobile.removeEventListener('change', resize); splitter.destroy(); host.replaceChildren(); } };
}

OutSystems implementation

Use BluKavantUi_Community_Layout → Splitter. Put an account list in Primary and the detail form in Secondary. This complete layout recipe is Community on both Web and OutSystems.

Binding / handlerImplementation
Screen stateCreate ActiveAccountId, PaneSize (Decimal), NavigationCollapsed (Boolean), and a draft list keyed by account ID.
PlaceholdersPlace your navigation widgets in Primary and detail widgets in Secondary. Bind note inputs to the active record’s draft value.
OnLayoutChangedAssign PrimarySize to PaneSize and IsCollapsed to NavigationCollapsed; bind those variables back to the Block inputs.
Account selectionStore the current draft, assign the new ActiveAccountId, load its draft, then fetch authorized details if needed.
Small viewportSet IsVertical based on your responsive layout decision, or use a list/detail navigation flow. Keep a visible way back to the account list.

Add these native Blocks to your consumer Screen, bind the listed events and connect your application actions. The interactive example above runs the web implementation.

Open the full native Splitter API →
AVOID THESE FAILURES

What breaks this workflow

One shared note variable

Changing the selection can leak one account’s draft into another. Key the data by record identity.

Replacing content on resize

Resizing should only change layout. Recreating fields can lose caret position and unsaved text.

Only a draggable divider

Keep keyboard resizing/collapse available and provide a labeled restore control.

BEFORE YOU SHIP

Verify the behavior, including recovery.

  • Two accounts retain two different notes after repeated switches.
  • Collapse and expand preserve the selected account and draft.
  • Keyboard separator controls work without a pointer.
  • A late detail response cannot replace a newer selection; drafts follow the record ID.

Use the linked component accessibility notes when reviewing focus, keyboard behavior and status announcements in your implementation.

All patterns →

Search BluKavantUI