SurfaceDepth
Fine borders, inset edge lighting, and layered shadows. Compare the original surface and inspect each layer.
Toggle layers to inspect the current recipe. Copy uses the complete recipe.
Install
Documentation entry, not a registry item. Its shadow and border tokens install with @jbm/tokens.
npx shadcn@latest add @jbm/tokensNeeds the @jbm entry in components.json; see Install once.
Usage
import { shadow, surfaceBorder } from "@/jbm/lib/tokens"// Light surface (use cardDark for dark surfaces)<div style={{ boxShadow: shadow.card, border: surfaceBorder.card,}} />import { color, radius, shadow, surfaceBorder } from "@/jbm/lib/tokens"<div style={{ background: color.codeBg, borderRadius: radius.card, boxShadow: shadow.cardDark, border: surfaceBorder.cardDark,}} />API
- Stage
n/aDocumentation entry for token recipes; nothing installs as a component. The gallery lab renders two sample surfaces with layer toggles.
shadowconstant
Complete raised-surface box-shadows: card for light surfaces and cardDark for ink surfaces. Apply the whole recipe rather than copying layers into components.
surfaceBorderconstant
The 1px border that defines the silhouette: card (ink at 12%) and cardDark (ink at 65%). Pair with the shadow of the same name.
shadowLayersconstant
Each recipe split into inset (upper edge highlight and lower inner line), contact (1px crisp contact), and ambient (offsets 3, 6, 12, 24px with negative spread and falling opacity). The gallery lab toggles these independently.
QA checks
- Toggle Before and Layered: Before shows the original single broad shadow and 2px border and disables the layer controls.
- Toggle border, inset highlight, contact shadow, and soft outer shadows one at a time on both the light and dark samples; each change should be visible and none should leave a clipped shadow.
- Inspect at actual display scale: edges readable without looking embossed, and the highlight reads as edge light rather than a separate stripe.
- Press Copy token usage with and without clipboard access; the status line reports success or points to the Usage snippet.
- Exercise the buttons and checkboxes by keyboard and confirm visible focus.