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
  • sm

    Small shadow. Typically used for slightly elevated components like input fields or chips.

    Declaration

    Swift

    public let sm: ThemeShadow
  • md

    Medium shadow. Suitable for cards, modals, and elevated surfaces.

    Declaration

    Swift

    public let md: ThemeShadow
  • lg

    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

    none

    Shadow style with no elevation.

    sm

    Small elevation shadow.

    md

    Medium elevation shadow.

    lg

    Large elevation shadow.

    focus

    Shadow used to indicate focus state.

  • Returns a new ThemeShadows instance 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
    ) -> ThemeShadows

    Parameters

    sm

    Optional override for the small shadow.

    md

    Optional override for the medium shadow.

    lg

    Optional override for the large shadow.

    focus

    Optional override for the focus shadow.

    none

    Optional override for the no-shadow style.

    Return Value

    A new ThemeShadows instance with applied overrides.