Skip to content

matlab/matlab-agentic-toolkit / skills-catalog/matlab-app-building/matlab-build-app

matlab-build-app

Unverified

Build MATLAB apps from requirements to working code. Asks discovery questions (or skips them when the path is known), recommends UIFigure or UIHTML architecture, identifies layout archetype (Dashboard, Explorer, Tabbed, Wizard, Canvas), produces an implementation plan, and executes the build. For UIFigure apps, optionally serializes as App Designer (.mlapp or plain-text .m + .xml). Use when a user wants to build a MATLAB app, create a GUI, make an interactive tool, build a uifigure app, build a uihtml app, build an App Designer app, build a .mlapp app, build a plain-text App Designer app, or asks which approach to use. Also use when user describes spatial layout needs: dashboard, control panel, sidebar, tabs, wizard, stepper, canvas, workspace.

FileKindSize
SKILL.mdskill md20.9 KB
assets/colors_and_type.cssother12.8 KB
assets/minimal-bridge.htmlother1.3 KB
assets/minimal-bridge.mother1.2 KB
assets/standalone-chart-template.htmlother11.5 KB
manifest.yamlconfig672 B
references/app-designer/agent-guide-mlapp.mdmarkdown15.7 KB
references/app-designer/agent-guide-plaintext.mdmarkdown14.7 KB
references/app-designer/agent-guide-shared.mdmarkdown27.1 KB
references/app-designer/background-tasks.mdmarkdown4.8 KB
references/app-designer/plaintext/classdef-template.mdmarkdown11.3 KB
references/app-designer/plaintext/matlabAppSchema.xsdother16.8 KB
references/app-designer/plaintext/property-reference.mdmarkdown45.1 KB
references/app-designer/plaintext/xml-template.mdmarkdown12.3 KB
references/archetypes/canvas.mdmarkdown8.0 KB
references/archetypes/dashboard.mdmarkdown6.4 KB
references/archetypes/explorer.mdmarkdown5.7 KB
references/archetypes/tabbed.mdmarkdown6.6 KB
references/archetypes/wizard.mdmarkdown9.7 KB
references/background-tasks.mdmarkdown6.9 KB
references/editing-guide.mdmarkdown3.3 KB
references/timers.mdmarkdown2.1 KB
references/uifigure/callbacks.mdmarkdown3.0 KB
references/uifigure/components.mdmarkdown1.7 KB
references/uifigure/containers.mdmarkdown1.3 KB
references/uifigure/grid-layout.mdmarkdown4.9 KB
references/uifigure/guide.mdmarkdown5.3 KB
references/uifigure/layout-patterns.mdmarkdown1.5 KB
references/uifigure/mvvm-background-tasks.mdmarkdown3.9 KB
references/uifigure/mvvm-guide.mdmarkdown11.1 KB
references/uifigure/mvvm-testing.mdmarkdown2.8 KB
references/uifigure/mvvm-view-binding.mdmarkdown5.4 KB
references/uihtml/brand-design-tokens.mdmarkdown5.6 KB
references/uihtml/bridge-guide.mdmarkdown7.0 KB
references/uihtml/chart-bridge-integration.mdmarkdown7.5 KB
references/uihtml/chart-performance.mdmarkdown5.0 KB
references/uihtml/chart-type-selection.mdmarkdown3.1 KB
references/uihtml/chart-updates.mdmarkdown4.7 KB
references/uihtml/charting-guide.mdmarkdown3.9 KB
references/uihtml/chartjs-setup.mdmarkdown4.0 KB
references/uihtml/communication-patterns.mdmarkdown4.2 KB
references/uihtml/component-styles.mdmarkdown4.3 KB
references/uihtml/css-layout-patterns.mdmarkdown5.0 KB
references/uihtml/dark-mode.mdmarkdown3.8 KB
references/uihtml/data-types.mdmarkdown2.7 KB
references/uihtml/doughnut-scatter-charts.mdmarkdown6.0 KB
references/uihtml/error-handling.mdmarkdown4.6 KB
references/uihtml/external-color-schemes.mdmarkdown2.6 KB
references/uihtml/js-coding-guide.mdmarkdown11.2 KB
references/uihtml/js-testing-debugging.mdmarkdown2.9 KB
references/uihtml/line-bar-charts.mdmarkdown5.2 KB
references/uihtml/mvvm-guide.mdmarkdown11.0 KB
references/uihtml/mvvm-observable-classes.mdmarkdown2.9 KB
references/uihtml/mvvm-view-binding.mdmarkdown5.3 KB
references/uihtml/platform-limitations.mdmarkdown2.5 KB
references/uihtml/setup.mdmarkdown3.9 KB
references/uihtml/styling-guide.mdmarkdown8.1 KB
scripts/+module/+backgroundtask/BackgroundTaskModule.pbinary2.5 KB
scripts/+module/+backgroundtask/templates/cancelBackground.mother357 B
scripts/+module/+backgroundtask/templates/handleBackgroundComplete.mother1.4 KB
scripts/+module/+backgroundtask/templates/safeProgress.mother734 B
scripts/+module/+backgroundtask/templates/startBackground.mother1.2 KB
scripts/+module/AppBuilderModule.pbinary242 B
scripts/AppDesignerAgentInterface.pbinary12.6 KB
scripts/MlappBackend.pbinary9.4 KB
scripts/PlainTextBackend.pbinary10.2 KB

references/archetypes/tabbed.md

View on GitHub
# Tabbed View Layout

**Primary user task:** Navigate between independent sections of a larger app without leaving the page.

```
┌────────────────────────────────────────────────────────┐
│  App Title / Header (optional)                         │  ← header (optional, fixed height)
├──────────┬───────────┬───────────┬─────────────────────┤
│ Tab 1 ●  │  Tab 2    │  Tab 3    │                     │  ← tab bar (fixed height ~36px)
├──────────┴───────────┴───────────┴─────────────────────┤
│                                                        │
│   Active tab content                                   │  ← content area (fills space)
│   (only one tab visible at a time)                     │
│                                                        │
└────────────────────────────────────────────────────────┘
```

**When to choose:** The app has 2–6 distinct sections that are navigated between, not scrolled through. Sections are largely independent — changing one tab doesn't update another. Examples: Overview / Details / Settings, Train / Evaluate / Export, Configure / Run / Results.

**Key rules:**
- 2–6 tabs; more than 6 → use a left-nav sidebar instead (Canvas archetype)
- Tab content is swapped, not stacked — only the active panel is visible (UIFigure app auto-handles this)
- Tabs at top is the default; tabs on the left side work for 4+ dense sections
- A header above the tab bar is optional — use it for app-level actions (save, export) that span all tabs

---

## UIFigure app — uitabgroup Skeleton

MATLAB's `uitabgroup` handles all the chrome automatically — tab bar rendering, switching, and content area sizing.

```matlab
fig = uifigure('Name', 'App');

% Simple: just tabs, no header above
tg = uitabgroup(fig);

tab1 = uitab(tg, 'Title', 'Overview');
tab1Grid = uigridlayout(tab1, [2 2]);
tab1Grid.RowHeight   = {'1x', 120};
tab1Grid.ColumnWidth = {'1x', '1x'};
% Add components to tab1Grid...

tab2 = uitab(tg, 'Title', 'Details');
tab2Grid = uigridlayout(tab2, [1 1]);
ax = uiaxes(tab2Grid);

tab3 = uitab(tg, 'Title', 'Settings');
tab3Grid = uigridlayout(tab3, [6 2]);
tab3Grid.RowHeight   = repmat({'fit'}, 1, 6);
tab3Grid.ColumnWidth = {'fit', '1x'};
% Add form controls...
```

### With app header above tabs

```matlab
fig = uifigure('Name', 'App');

rootGrid = uigridlayout(fig, [2 1]);
rootGrid.RowHeight  = {48, '1x'};
rootGrid.Padding    = [0 0 0 0];
rootGrid.RowSpacing = 0;

header = uipanel(rootGrid);
header.Layout.Row = 1;
headerGrid = uigridlayout(header, [1 3]);
headerGrid.ColumnWidth = {'1x', 'fit', 'fit'};
uilabel(headerGrid, 'Text', 'My App', 'FontSize', 16, 'FontWeight', 'bold');
uibutton(headerGrid, 'Text', 'Export');
uibutton(headerGrid, 'Text', 'Save');

tg = uitabgroup(rootGrid);
tg.Layout.Row = 2;

tab1 = uitab(tg, 'Title', 'Tab 1');
% ... add content as above
```

### Responding to tab changes

```matlab
tg.SelectionChangedFcn = @onTabChanged;

function onTabChanged(src, evt)
    % src.SelectedTab.Title gives the active tab name
    % Use to trigger lazy data loading when a tab is first opened
    if evt.NewValue == tab2 && ~isloaded
        loadTabData();
        isloaded = true;
    end
end
```

---

## UIHTML/web app — CSS + JS Skeleton

```html
<div class="app">
    <header class="app-header"><!-- optional --></header>
    <nav class="tab-bar" role="tablist">
        <button class="tab-btn active" data-tab="overview" role="tab">Overview</button>
        <button class="tab-btn" data-tab="details" role="tab">Details</button>
        <button class="tab-btn" data-tab="settings" role="tab">Settings</button>
    </nav>
    <main class="tab-content">
        <section class="tab-panel active" id="tab-overview">...</section>
        <section class="tab-panel" id="tab-details">...</section>
        <section class="tab-panel" id="tab-settings">...</section>
    </main>
</div>
```

```css
.app {
    display: grid;
    grid-template-rows: auto auto 1fr;  /* header (optional), tab bar, content */
    height: 100vh;
}

.tab-bar {
    display: flex;
    border-bottom: 2px solid var(--border);
    padding: 0 var(--space-4);
    gap: 0;
}

.tab-btn {
    padding: var(--space-2) var(--space-4);
    border: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    background: none;
    cursor: pointer;
    font-size: var(--text-base);
    color: var(--text-secondary);
    white-space: nowrap;
}

.tab-btn:hover { color: var(--text-primary); }
.tab-btn.active {
    color: var(--text-primary);
    border-bottom-color: var(--accent);
    font-weight: var(--fw-semi);
}

.tab-content {
    overflow: auto;
    padding: var(--space-4);
}

.tab-panel { display: none; }
.tab-panel.active { display: block; }
```

```javascript
document.querySelectorAll('.tab-btn').forEach(btn => {
    btn.addEventListener('click', () => {
        const tabId = btn.dataset.tab;

        document.querySelectorAll('.tab-btn').forEach(b => b.classList.remove('active'));
        document.querySelectorAll('.tab-panel').forEach(p => p.classList.remove('active'));

        btn.classList.add('active');
        document.getElementById('tab-' + tabId).classList.add('active');
    });
});
```

---

## Common Variations

| Variation | Change |
|---|---|
| Tabs on left side | Use `uitabgroup` `TabLocation = 'left'` (UIFigure app); CSS: sidebar-style nav + `grid-template-columns: auto 1fr` |
| Badge / count on tab | UIFigure app: `tab.Title = sprintf('Errors (%d)', n)`; UIHTML app: add `<span class="badge">` |
| Disabled tab | UIFigure app: `tab.Enable = 'off'`; UIHTML app: `aria-disabled="true"` + pointer-events: none |
| Lazy tab loading | UIFigure app: use `SelectionChangedFcn`; UIHTML app: check `if (!loaded)` in tab switch handler |
| Nested tabs | Avoid — creates spatial confusion. Use a sidebar nav (Canvas archetype) instead |

---

## Composition

- **UIFigure app:** `references/uifigure/guide.md` for content within each tab
- **UIHTML/web app:** `references/uihtml/styling-guide.md` for tab bar styling; `references/uihtml/js-coding-guide.md` for event delegation patterns
- **MVVM note:** Tab state (which tab is active) is view-only — it doesn't need to live in the ViewModel unless tab switches trigger data loads

----

Copyright 2026 The MathWorks, Inc.

----
brainstormingobra/superpowersYou MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or planning anything new, in software or out of it (a talk, a business, a renovation).Stars: 322kUpdated Claude CodeCodexVerifiedInstall
brand-guidelinesanthropics/skillsApplies Anthropic's official brand colors and typography to any sort of artifact that may benefit from having Anthropic's look-and-feel. Use it when brand colors or style guidelines, visual formatting, or company design standards apply.Stars: 198kUpdated Claude CodeCodexVerifiedInstall
frontend-designanthropics/skillsGuidance for distinctive, intentional visual design when building new UI or reshaping an existing one. Helps with aesthetic direction, typography, and making choices that don't read as templated defaults.Stars: 198kUpdated Claude CodeCodexVerifiedInstall
mcp-builderanthropics/skillsGuide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when building MCP servers to integrate external APIs or services, whether in Python (FastMCP) or Node/TypeScript (MCP SDK).Stars: 198kUpdated Claude CodeCodexVerifiedInstall