Type Safely

Type Safely

Share this post

Type Safely
Type Safely
Use .drop and .inner as a ShadowStyle

Use .drop and .inner as a ShadowStyle

Daily Coding Tip 139

Millie Sturgeon's avatar
Millie Sturgeon
Jul 28, 2022
∙ Paid

Share this post

Type Safely
Type Safely
Use .drop and .inner as a ShadowStyle
Share
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.

Keep reading with a 7-day free trial

Subscribe to Type Safely to keep reading this post and get 7 days of free access to the full post archives.

Already a paid subscriber? Sign in
© 2025 Type Safely
Privacy ∙ Terms ∙ Collection notice
Start writingGet the app
Substack is the home for great culture

Share