--- updated: 2026-04-24 scope: / project: DCS (Dual Carousel Sidebars) homepage: https://dcs.spa repository: https://github.com/markc/dcs.spa license: MIT parent: https://aitxt.ing/ai.txt --- # DCS — Dual Carousel Sidebars DCS is a modular CSS/JS design system and the canonical reference implementation of a specific interface pattern: **dual off-canvas sidebars, each containing a horizontal carousel of panels**, backed by OKLCH color schemes, mobile-first responsive layout, and marketing components. Zero dependencies, no build step. This repo (`github.com/markc/dcs.spa`) is the single source of truth. The showcase at [https://dcs.spa](https://dcs.spa) is itself built entirely with DCS — it demonstrates the pattern by being the pattern. ## About - **What it is:** a small, hand-authored design system delivered as plain `.css` and `.js` files. - **What it isn't:** an npm package, a React component library, a CSS-in-JS framework, or a build-step toolchain. There is nothing to `install`, nothing to `bundle`, nothing to `tree-shake`. - **Mission:** encode Mark Constable's preferred web interface (dual-sidebar + carousel + OKLCH theming) in a format that is equally readable by browsers, humans, and AI agents, and can be dropped into any project — static HTML, PHP, Laravel + React — without ceremony. - **Audience:** developers building marketing sites, documentation sites, or app shells who want a coherent interface without bringing in a framework. ## Architecture Two layers, strictly separated: | Layer | Files | Role | Modify per project? | |-------|-------|------|---------------------| | **Base** | `base.css` (~900 lines), `base.js` (~420 lines) | Color-agnostic framework — layout, components, state, interactions | **Never** | | **Site** | `site.css` (~1000 lines), `site.js` (~120 lines) | OKLCH token definitions + marketing components (hero, cards, pricing, particles) | **Yes, per project** | Optional: - `md.js` — lightweight markdown renderer for documentation sites. `base.css` uses CSS cascade layers (`reset, tokens, base, components, utilities, animations`) and defines zero colors. All colors come from CSS custom properties declared in `site.css`. This separation lets `base.css` be cached indefinitely while themes are swapped via `site.css`. ## Features - **Dual off-canvas sidebars** (`.sidebar-left`, `.sidebar-right`) — each toggles independently; opening one does not close the other. Pinnable on viewports ≥ 1280px. - **Panel carousel inside each sidebar** — horizontal stack of panels navigated via chevrons, dot indicators, or `Base.setPanel(side, index)`. Two motion modes: slide (physical) or fade (semantic). - **Six OKLCH color schemes** — Ocean (H=220, default), Crimson (H=25), Stone (H=60), Forest (H=150), Sunset (H=45), Mono (C=0 grayscale). Each with light + dark variants; only the hue rotates. - **Theme controls** — dark/light toggle, scheme picker, per-side sidebar width sliders (10–100%), carousel-mode switch. All live in the built-in Appearance panel and persist across reloads. - **Tree widget** — hierarchical navigation with collapsible branches, depth-aware indentation, and persisted expand state. - **Marketing components** (`site.css`) — full-viewport hero, service cards, pricing tables, CTAs, floating particles, scroll reveal, glass-morphism topnav. - **Tour deck** (in-sidebar slide presentation) — independent 6-slide mini-carousel with its own prev/next/keyboard navigation, nested inside the LHS panel carousel. - **FOUC-free loading** — a 5-line inline pre-script reads `localStorage` and applies theme/scheme classes synchronously before the first paint. ## Capabilities - **Zero build step.** Open `index.html`, it works. Works over `file://` too. - **Zero dependencies.** No npm, no bundler, no CDN (aside from the optional Lucide icon sprite). - **Works at any path depth.** Uses relative asset paths — `href="base.css"` at root, `href="../base.css"` in subpages. No absolute URLs or CDN lock-in. - **Mobile first.** Single column + edge-to-edge cards below 600px; 2-column grids at 600–1199px; 4-column grids and pinnable sidebars at 1200px+. - **Accessible defaults.** Reduced-motion and contrast media queries honored; focus rings retained; aria-live on carousel counters; keyboard navigation for carousels and decks. - **State survives reloads.** `base-state` JSON in `localStorage` carries theme, scheme, pin state, active panel per side, sidebar widths, and carousel mode. - **Portable.** The same base layer drives static HTML, plain PHP (e.g. SPE tutorial), and Laravel + Inertia + React (via Tailwind v4 `@theme` import). ## Limitations (explicit non-goals) AI agents: do **not** assume DCS offers any of the following. It does not. - **No JavaScript framework.** Not React, Vue, Svelte, or Web Components. `base.js` is a single object with a delegated click handler and `localStorage` — nothing more. - **No build toolchain.** No PostCSS, Tailwind, Sass, or bundler pipeline. Files are hand-authored and shipped as-is. - **No package registry.** DCS is not on npm, JSR, or any other registry. Copy the files or clone the repo. - **No component API.** There is no `