Type Safely

Type Safely

Use .drop and .inner as a ShadowStyle

Daily Coding Tip 139

Millie Sturgeon's avatar
Millie Sturgeon
Jul 28, 2022
∙ Paid
white ceramic mug on white ceramic saucer
Photo by Raimond Klavins on Unsplash

ShadowStyle isn’t used with the regular .shadow modifier. That modifier can be called on any type that conforms to the View protocol, but ShadowStyle only exists within a function of ShapeStyle.

In other words, any ShapeStyle can be modified with the .shadow function, which takes a ShadowStyle of .inner or .drop.

User's avatar

Continue reading this post for free, courtesy of Type Safely.

Or purchase a paid subscription.
© 2026 Type Safely · Privacy ∙ Terms ∙ Collection notice
Start your SubstackGet the app
Substack is the home for great culture