demo/the-monday-style-admin-pattern.html
← all demo posts

The Monday-style admin pattern, in three components

The Monday-style admin pattern, in three components

The three components

A Monday-style admin feels different from a generic admin in three specific ways.

1. Inline editing

You click a cell, type, click away, it saves. No modal, no save button, no form.

function Cell({ value, onSave }: Props) {
  const [editing, setEditing] = useState(false);
  const [draft, setDraft] = useState(value);

  if (!editing) {
    return <div onClick={() => setEditing(true)}>{value}</div>;
  }

  return (
    <input
      autoFocus
      value={draft}
      onChange={(e) => setDraft(e.target.value)}
      onBlur={() => { onSave(draft); setEditing(false); }}
    />
  );
}

2. Optimistic UI

The UI updates immediately. The network request happens in the background. If it fails, you roll back.

async function save(id: string, value: string) {
  const previous = cache.get(id);
  cache.set(id, value);                 // optimistic
  try {
    await api.update(id, value);
  } catch (e) {
    cache.set(id, previous);            // rollback
    toast.error('Save failed');
  }
}

3. Toast notifications

Subtle, never blocking, auto-dismiss after 2 seconds. Tell the user what happened without making them click anything.

Why this matters

The default CRUD pattern teaches users to be careful. The Monday pattern teaches users to be fast.

Careful users edit once a week. Fast users edit forty times a day. The same product, two different relationships, depending on how the interface feels.

I have built admins both ways. The Monday pattern wins every time the user spends more than 30 minutes in the tool.