Customization/Layout and density

Layout and density

Choose how the app frames its pages and how much fits on a screen. Both are settings people can change in Themes, with defaults you set in code.

CustomersPreview
Modern, the default: the page floats as a rounded panel beside the sidebar
Modern, the default: the page floats as a rounded panel beside the sidebar

Layout styles

Modern, the default, gives the page the sidebar's colour and floats the content on a rounded panel. Classic runs the sidebar and page edge to edge. Phones always use the Classic frame, since an inset panel only takes space on a small screen.

The choice is saved with each person's preferences and set as data-layout on <html> before the page first appears. All of Modern's styling is one short block in src/app/globals.css, under html[data-layout="modern"].

To ship only one style, set layout in DEFAULT_PREFERENCES (src/lib/data/preferences.ts) and remove the Layout style choice from components/settings/preferences-tab.tsx and components/shell/themes-dialog.tsx.

Density

Comfortable is the default. Compact fits more on screen by tightening the spacing scale itself, so every gap and padding shrinks together:

src/app/globals.css
html[data-density="compact"] {
  --spacing: 0.21rem; /* Tailwind's default is 0.25rem */
}

Table rows also drop to 32px in Compact. Each table view has its own Row height in Manage View too, which wins over the density. To change the default for everyone, set density in DEFAULT_PREFERENCES.

The Themes window

Themes at the foot of the sidebar opens one window with everything on this and the Colours page: appearance (Light, Dark or System), theme colour, font, density and layout style, with previews. Reset to defaults goes back to Light, Neutral, Inter, Comfortable and Modern. It's components/shell/themes-dialog.tsx; the same options are in Settings › Preferences.

When you change a default in code, change DEFAULTS at the top of themes-dialog.tsx too, so Reset to defaults lands on your look.

Spacing and corners

TokensValues
Cornersrounded-chip 4px, rounded-md 6px (controls), rounded-lg 8px (cards), rounded-popover 10px, rounded-panel 12px
Control heightsh-control 28px, h-button 30px, h-control-lg 32px, h-toolbar 44px
SpacingTailwind's scale on --spacing (0.25rem), which Compact tightens
MotionOne easing curve, ease-smooth, and durations from --motion-fast (150ms) to --motion-panel (300ms)

For softer or sharper corners, change the radius tokens in globals.css rather than single components, so cards, menus and dialogs stay in step.