ThemeSpacing
public struct ThemeSpacing
Defines the standard spacing scale for layout and padding/margin values throughout the app.
-
Extra-small spacing. Used for tight gaps between small elements like icons or labels.
Declaration
Swift
public let xs: CGFloat -
Small spacing. Typically used for padding inside buttons, cards, or input fields.
Declaration
Swift
public let sm: CGFloat -
Medium spacing. Ideal for spacing between grouped elements or sections.
Declaration
Swift
public let md: CGFloat -
Large spacing. Used for separating components or laying out screen-level spacing.
Declaration
Swift
public let lg: CGFloat -
Extra-large spacing. Often used for outer padding or generous layout gaps.
Declaration
Swift
public let xl: CGFloat -
Double-extra-large spacing. Reserved for very large vertical spacing or whitespace-heavy layouts.
Declaration
Swift
public let xxl: CGFloat -
Default spacing scale based on common design system sizes.
Declaration
Swift
public static let defaultLight: ThemeSpacing -
Default spacing scale based on common design system sizes.
Declaration
Swift
public static let defaultDark: ThemeSpacing -
Undocumented
Declaration
Swift
public init(xs: CGFloat, sm: CGFloat, md: CGFloat, lg: CGFloat, xl: CGFloat, xxl: CGFloat) -
Returns a new
ThemeSpacinginstance by copying the current one and applying the specified overrides.Only the parameters you pass will be changed; others retain their original values.
Declaration
Swift
func copy( xs: CGFloat? = nil, sm: CGFloat? = nil, md: CGFloat? = nil, lg: CGFloat? = nil, xl: CGFloat? = nil, xxl: CGFloat? = nil ) -> ThemeSpacingParameters
xsOptional override for extra-small spacing.
smOptional override for small spacing.
mdOptional override for medium spacing.
lgOptional override for large spacing.
xlOptional override for extra-large spacing.
xxlOptional override for double-extra-large spacing.
Return Value
A new
ThemeSpacinginstance with the applied overrides.