A school for shadows, light and elevation

Light first. Shadow follows.

Every shadow on this site, from the letters to the buttons, is computed live from one lamp. Move it and watch the whole page answer. That is the lesson: light first, shadow follows.

Shadow angle
000°
Throw
0.00×
Lamp height
000px
01 / Anatomyscroll to lift the card

Anatomy of a shadow

  1. 01Lift. A surface leaves the page. The further it rises, the further its shadow falls and the softer it gets.
  2. 02Split. One believable shadow is really three: a wide ambient haze, a directional key, a tight contact line.
  3. 03Stack. Layer them back together. Read the CSS: every value came from the lamp, right now.
ambient
key
contact
Studio bookingSweep B / Thursday
elev 0pxConfirm
Ambientnone

Skylight from everywhere. Wide, faint, almost centred.

Keynone

The lamp itself. Sets direction and length.

Contactnone

Where the surface nearly touches. Dark and tight.

box-shadow, livestep 1 / 3
none
02 / Elevationone scale, five levels

Elevation is a scale

cardSweep A
DuplicateMove to sweepArchive
Move 3 frames?

They keep their light setup.

CancelMove
Frames moved
  1. elev-0Page0px
  2. elev-1Card2px
  3. elev-2Menu6px
  4. elev-3Modal12px
  5. elev-4Toast24px
03 / Bad shadowstoggle the fix, watch it re-flow

Three shadows to unlearn

Invoice 0412
Pure black

Muddy black

rgba(0,0,0,.6) turns the surface under it grey and dirty. Real shadows carry the colour of the room.Tinted from the background, split into layers, each one faint. The card lifts instead of staining the page.

Draft
Review
Live
Three suns

Conflicting lights

Each component was styled alone, so each one has its own sun. The eye notices even when the brain does not.One light for the whole interface. Every pill now answers the same lamp you are holding.

Q3 lighting plan
120px blur

Too much blur

A huge soft halo with no edge. It reads as a glow, not a shadow, and the card floats nowhere in particular.A tight contact line anchors it, a modest key gives height. Blur grows with elevation, it is not a mood.

04 / Five ruleshover a rule
  • 01One light, one directionPick where the lamp is. Every surface answers it.
  • 02Tint, never blackShadow colour comes from the surface it falls on.
  • 03Higher means softerOffset and blur grow together. Opacity falls.
  • 04Contact grounds itA tight dark line says where it touches.
  • 05Elevation is meaningUse five levels, not fifty. Height says what is on top.
05 / Practicetwo rooms

Now hold the lamp yourself