NeoShadow is a Swift package that provides advanced shadow effects for SwiftUI shapes.
This package is a SwiftUI implementation inspired by the Beautiful Shadows Figma plugin by Alex Widua. The shadow generation algorithm and layer calculations are based on his excellent work.
NeoShadow supports two shadow styles - inner and drop shadows. Each can be fully customized using the following parameters.
style
: Shadow style:.inner
or.drop
, defaults to.drop
color
: Shadow base color, defaults to.black
brightness
: Controls shadow intensity from 0.0 to 1.0, defaults to0.1
elevation
: Determines shadow depth from 0.0 to 1.0, defaults to0.15
azimuth
: Light source angle, defaults to.degrees(60)
distance
: Distance from the light source to the surface, defaults to120
layerCount
: Number of shadow layers for depth effect, defaults to6
This project is available under the MIT license. See the LICENSE file for more info.