# Crisp: A Quiet, Business-First Design for the Strutvane Admin

There's a particular kind of software that people stare at for eight hours a day: the back office. Order lists. Invoice tables. Customer records. Stock levels.

For that kind of software, "exciting" is the wrong goal. You want something that's **calm, dense and easy to read**. Something that gets out of the way. Something that still looks good at 6 p.m. on a Friday, in dark mode, on a laptop screen.

That's Crisp.

---

## What it is

`@strutvane/design-crisp` is **Crisp, the default design** for the Strutvane admin UI. Strutvane is an open-source (MIT) TypeScript framework for business (B2B) apps, and its admin is split in two:

- `@strutvane/ui` holds **what the admin does**: the screens, tables, forms, filters, shortcuts and accessibility.
- A **design package** holds **how it looks**.

Crisp is the quiet, business-first design: soft zinc greys, one confident accent colour that follows your brand, thin hairlines instead of shadows, dense readable tables, and light and dark themes that get equal care. It's a good fit for back office, ERP, finance and B2B SaaS admin screens.

## Why it exists

When the admin UI stopped having a look of its own, it needed a good default one. A default design has a special job: it's what most people see first, and what many will never change. So it should be:

- **Readable before pretty.** Tables are the heart of a business app. Crisp uses 40 px rows, a sticky grey header and hairlines between rows, so your eye can follow a line across a wide table.
- **On-brand without effort.** One number (your brand hue) recolours the whole accent family: buttons, focus rings, links, selection and the first chart colours.
- **Accessible at every setting.** If a brand colour makes text unreadable, that's a bug, not a style choice. So Crisp tests it.

## What you get

**The look, screen by screen** (checked in a browser at 1440 px and 375 px, light and dark):

- **Shell**: a 240 px sidebar with your brand tile and app name, grouped links with icons and muted counts. The current page is a small white chip with a hairline border. Content sits in an inset white panel. A slim 48 px top bar holds a quiet search field with a `Ctrl K` hint.
- **Lists**: breadcrumbs, a clear title with the primary **New** button on the same row, search, a Columns menu, compact rows, and a dense table in its own bordered box with quiet "ghost" row actions.
- **Forms**: 32 px fields with outlines that are easy to find, a red `*` for required fields, short help lines, inline errors with an icon, and a sticky action bar with the primary button first.
- **Sign-in**: one centred card over a faint dot grid.
- **Dark mode**: a near-black canvas, a slightly lighter panel and a brighter accent ring. The command palette opens as a 640 px dialog near the top of the screen, with grouped results.
- **Phone (375 px)**: no horizontal scroll. The sidebar becomes a drawer, actions wrap under the title, and wide tables scroll inside their own box.

**The pieces**

- Fonts: **Inter Variable** for the UI and **Geist Mono** as the monospace font, self-hosted through an optional `fonts.css` (with a system-font fallback).
- About **100 Tabler icons** built in, and `createCrisp({ icons })` to add more by name.
- Original illustrations for empty, not-found, forbidden and error states.
- A chart palette, and the raw tokens (`crispLight`, `crispDark` and friends) for your own charts and custom screens.
- A ready-made **`crisp.css`** file for apps with a strict Content Security Policy.

## Brand it in four lines

Every Strutvane design understands four public tokens, and Crisp is no exception:

| Token | Crisp default | What it changes |
|---|---|---|
| `--brand-hue` | `272` (cobalt) | The whole accent family |
| `--font-sans` | Inter Variable, then system fonts | The UI font |
| `--radius` | `6px` | How rounded the corners are |
| `--density` | `1` | Control height, row height and spacing |

```css
/* resources/ui/theme.css */
:root {
  --brand-hue: 150;   /* green */
  --radius: 4px;
  --density: 0.9;
}
```

Crisp's own defaults sit at zero CSS specificity, so **your values always win**.

And here's the part I like most: the accent's lightness and saturation were chosen for the hardest hue to get right (teal), and the tests check **all 24 hues in 15° steps**. Whatever your brand colour, text and controls keep **WCAG AA contrast**.

## How it fits into Strutvane

Crisp implements the `@strutvane/ui` **Design contract** (`defineDesign()`) and passes `designConformance()`, the test kit every design must pass:

- every slot is filled;
- WCAG AA contrast in both themes at every brand hue;
- no hard-coded colours;
- zero axe accessibility violations on the reference screens;
- no horizontal scroll at 375 px.

Because both official designs implement the same contract, you can switch from Crisp to **Vivid** (the colourful alternative) at any time, and **no screen changes**. Your resources, routes and overrides all stay the same.

## A quick look

```bash
npm install @strutvane/design-crisp
```

Peer dependencies: `@strutvane/ui` and React 19.

```tsx
import '@strutvane/design-crisp/fonts.css' // optional: Inter Variable + Geist Mono
import { DesignProvider } from '@strutvane/ui/design'
import { StrutvaneApp } from '@strutvane/ui/react'
import { crisp } from '@strutvane/design-crisp'

export function Admin({ nonce }: { nonce: string }) {
  return (
    <DesignProvider design={crisp} nonce={nonce}>
      <StrutvaneApp apiUrl="/api" appName="Northwind Ops" />
    </DesignProvider>
  )
}
```

**Strict Content Security Policy?** Crisp's components never write inline `style` attributes. The provider injects one stylesheet with your request's nonce (a one-time value that tells the browser "this style is mine"). If you can't use a nonce, import `@strutvane/design-crisp/crisp.css` as a file and turn injection off.

> ⚠️ This is a **0.2 preview**. The APIs may still change before 1.0, planned for January 2027.

## Built to be trusted

- **106 automated tests**, including the full `designConformance()` suite and contrast checks at every brand hue in both themes.
- **CI on Linux, Windows and macOS**, on Node 24 and Node 26.
- **Security-reviewed** and secure by default: no inline styles, so it works under a strict CSP.
- **Every release is staged by CI and approved by a human with two-factor authentication**, and published with **npm provenance**.
- Licences are clear: the code is MIT, the fonts are SIL OFL 1.1 and the icons are Tabler Icons (MIT).

---

## Try it, and tell me what you think

- ⭐ **GitHub:** [github.com/vishwajit-vm/strutvane-design-crisp](https://github.com/vishwajit-vm/strutvane-design-crisp)
- 📦 **npm:** [npmjs.com/package/@strutvane/design-crisp](https://www.npmjs.com/package/@strutvane/design-crisp)
- 💬 **Feedback welcome.** Try your own brand hue and tell me how it looks. Screenshots of Crisp in your colours would make my day.

Next in the series: **Vivid**, Crisp's colourful sibling. Follow along! ✨

*— Vishwajit VM*

---

*Part of the Strutvane series. Strutvane™ is open source under the MIT licence.*
