Agentic BP DScode-first design system

Grid systems

Viewport widths 1280, 1440 and 1920 are the base widths. Gutters and margins use the spacing steps. The rest is kit-defined.

Product layout patterns first: app shell, canvas, workspace, metrics, and content splits. Primitives stay available as the source scale.

Click any row or card to copy its token or class.

Product composition

app → header + canvas → workspace → content

Build product screens from these patterns instead of inventing per-page grids. The global header spans the full width. The app nav and the assistant are part of the shell and come in from off canvas. The page is a page header plus content blocks; a rail on the page is a drawer, inline or off canvas, not the assistant.

Dashed: shell panels that come in from off canvas. The rows show the most slots: five on a dashboard, four on a form or record.

<div className="layout-app">
  <header className="layout-header">{/* global header, full width */}</header>
  <div className="layout-canvas">
    <aside>{/* app nav */}</aside>
    <div className="layout-workspace">
      <main className="layout-content">
        {/* page header, then content blocks */}
        <section className="layout-metrics layout-metrics--fixed-5">…</section>
        <section className="layout-split layout-split--quarters">
          <div className="layout-stack">…</div>
          <div className="layout-stack">…</div>
          <div className="layout-stack">…</div>
          <div className="layout-stack">…</div>
        </section>
      </main>
      <aside>{/* page rail: an inline drawer */}</aside>
    </div>
    <aside>{/* assistant */}</aside>
  </div>
</div>

Patterns

.layout-*

Metrics

.layout-metrics

KPI rows. Fixed variants keep equal columns. The default auto-fits from --layout-metrics-min. A dashboard row holds up to five slots.

.layout-metrics--fixed-3

Revenue
Open invoices
Overdue

.layout-metrics--fixed-4

1
2
3
4

.layout-metrics--fixed-5

1
2
3
4
5

Content splits

.layout-split*

Panels inside .layout-content. Primary is the default table plus activity layout. Form and record views hold up to four slots.

.layout-split--primary

Main · table
Aside · activity

.layout-split

Half
Half

.layout-split--thirds

1
2
3

.layout-split--quarters

1
2
3
4

Stack

.layout-stack

A column of Sections inside another layout, such as the side of a split. The same 24px gap as .layout-content, without its page inset.

Main · details
Main · products
Aside · quick links
Aside · primary contact

App shell

--layout-sidebar · --layout-rail

Field column

--layout-column-max

The widest one column of fields or FormDisplay rows gets in a record or form view: a 234 label, a 12 gap and a 308 field. Up to 3 columns; past them the page stays empty.

Gutter

--layout-gutter-*

Space between columns and cards.

Margin

--layout-margin-*

Page inset around content. 2xl is for wide, high-resolution screens.

Containers

.layout-container-*

Centered max-width shells for docs and marketing. Prefer the product patterns above for app screens.