ThemeShadows
public struct ThemeShadows
A collection of predefined shadow styles used to indicate elevation, depth, or focus across the UI.
-
No shadow. Used for flat surfaces and elements that should appear flush with the background.
Declaration
Swift
public let none: ThemeShadow -
Small shadow. Typically used for slightly elevated components like input fields or chips.
Declaration
Swift
public let sm: ThemeShadow -
Medium shadow. Suitable for cards, modals, and elevated surfaces.
Declaration
Swift
public let md: ThemeShadow -
Large shadow. Used for high-elevation components such as floating panels or bottom sheets.
Declaration
Swift
public let lg: ThemeShadow -
Focus shadow. Applied to inputs or buttons when they are in a focused or active state.
Declaration
Swift
public let focus: ThemeShadow -
Default shadow set optimized for light mode. Uses dark shadow colors on light surfaces.
Declaration
Swift
public static let defaultLight: ThemeShadows -
Default shadow set optimized for dark mode. Uses subtle light shadows to maintain depth.
Declaration
Swift
public static let defaultDark: ThemeShadows -
Initializes a custom shadow scale set.
Declaration
Swift
public init(sm: ThemeShadow, md: ThemeShadow, lg: ThemeShadow, focus: ThemeShadow, none: ThemeShadow)Parameters
noneShadow style with no elevation.
smSmall elevation shadow.
mdMedium elevation shadow.
lgLarge elevation shadow.
focusShadow used to indicate focus state.
-
Returns a new
ThemeShadowsinstance by copying the current one and applying the specified overrides.Only the provided parameters will be replaced; all others will retain their existing values.
Declaration
Swift
func copy( sm: ThemeShadow? = nil, md: ThemeShadow? = nil, lg: ThemeShadow? = nil, focus: ThemeShadow? = nil, none: ThemeShadow? = nil ) -> ThemeShadowsParameters
smOptional override for the small shadow.
mdOptional override for the medium shadow.
lgOptional override for the large shadow.
focusOptional override for the focus shadow.
noneOptional override for the no-shadow style.
Return Value
A new
ThemeShadowsinstance with applied overrides.