effects
backdropDropShadow
Shadows the rendered shape of whatever shows through the host — a subtle depth cue behind a translucent panel, where u.shadow() and u.dropShadow() cover the element's own box.
import { backdropDropShadow } from "@sdxc/u/effects";Quick reference
Every documented call, beside the CSS it emits.
| Call | CSS |
|---|---|
u.backdropDropShadow() | css({ "--ui-backdrop-drop-shadow": "calc(var(--ui-spacing, 0.25rem) * 0) calc(var(--ui-spacing, 0.25rem) * 1) calc(var(--ui-spacing, 0.25rem) * 2) rgb(0 0 0 / 0.15)", backdropFilter: "... drop-shadow(var(--ui-backdrop-drop-shadow, 0 0 0 transparent))" }) |
u.backdropDropShadow({ y: "2px", blur: "4px", color: "brand" }) | css({ "--ui-backdrop-drop-shadow": "calc(var(--ui-spacing, 0.25rem) * 0) 2px 4px var(--ui-brand-border)", backdropFilter: "... drop-shadow(var(--ui-backdrop-drop-shadow, 0 0 0 transparent))" }) |
Using a custom value
Every scale argument also takes a raw CSS value, which passes through untouched.
u.backdropDropShadow()Applying on a state
Wrap the call in a state utility to scope it to one selector.
u.hover(u.backdropDropShadow())Responsive design
Wrap the call in a container query to scope it to one width.
u.at("md", u.backdropDropShadow())Customizing the theme
The custom properties this utility reads, which a theme redefines.
| Variable |
|---|
--ui-backdrop-drop-shadow |
--ui-brand-border |
--ui-spacing |
Signature
u.backdropDropShadow(options?: BackdropDropShadowOptions)