design token

Shadows & Blurs

Layered shadow and backdrop blur tokens for depth.

Depth in Pindoba comes from layered shadows and backdrop blur. Both are tokens, and the shadows already know about the theme mode.

Shadows

Use boxShadow with a token name. The scale runs xs, sm, md, lg, xl, 2xl, plus inner for pressed or recessed surfaces.

import { css } from "@pindoba/styled-system/css";

<div className={css({ boxShadow: "md", borderRadius: "lg" })}>Raised card</div>;

Each tier follows two rules so shadows look smooth and match the border system:

  • Tinted, never black. The tint is the darkest end of the gray ramp, the same cool-gray family the border.* tokens use. It is mixed with color-mix, so it follows the ramp when you re-theme.
  • Layered. Every tier stacks two or three layers: a tight 1-3px contact layer that fuses with the 1px border, then ambient layers whose blur roughly doubles while staying low in opacity. Depth comes from accumulation, not one dense blob.

Shadows are semantic tokens: dark mode uses the same geometry at a much higher opacity, because a shadow tuned for a light surface vanishes on a dark one. You never write a _dark override.

tokens · shadows
tokenlayersdescription
xs2Hairline lift: inputs, chips
sm2Small controls and resting cards
md3Cards and raised panels
lg3Popovers and menus
xl3Dialogs and drawers
2xl3Hero and floating surfaces
inner2 (inset)Recessed or pressed surfaces

Blurs

The blurs tokens feed backdropBlur, filter blur and the translucent (trslct) utility.

tokens · blurs
tokenvaluesize
none0px0px
2xs0.05rem0.5px
xs0.1rem1px
sm0.2rem2px
md0.4rem4px
lg0.8rem8px
xl1.6rem16px
2xl2.0rem20px
3xl2.4rem24px
4xl3.2rem32px
5xl4.0rem40px

trslct accepts none through xl only. It applies backdrop-filter: blur(<token>) saturate(150%) brightness(100%).

<nav
  className={css({ trslct: "md", backgroundColor: "neutral.surface.peak/60" })}
>
  Glass navigation
</nav>

Give a glass surface a translucent background (a color with alpha) so there is something to blur through.

Try it

Compare every shadow on each surface, then pick a blur token to see it over a busy background.

Surface under the cards

On surface.ground. Shadows are mode-aware, so switch the theme to compare.

xs
sm
md
lg
xl
2xl
inner
Blur token
blur md (4px)

The glass uses trslct, which accepts none to xl. The larger tokens are for backdropBlur and filter: blur().

Best Practices

  • Pick a shadow by how far the element floats: xs-sm resting, md-lg raised, xl-2xl overlays
  • Do not add _dark shadow overrides; the tokens already flip
  • Keep the reserved 1px border: shadows are tuned to fuse with it
  • Use inner on pressed states rather than inventing an inset shadow