Inset Shadows
Adding the inset keyword to box-shadow draws the shadow inside the element rather than outside. Inset shadows simulate depth, embossing, and pressed states.
Syntax
box-shadow: inset offset-x offset-y blur-radius spread-radius color
Common Use Cases
- Text input fields that look sunken into the surface
- Pressed/active button states
- Inner highlight or light source effects
- Faked inner border without changing layout
Combining Inset and Outer
Outer and inset shadows can coexist in the same property — just add both, comma-separated.