ThemeRadii

public struct ThemeRadii

Defines standard corner radius values used throughout the design system.

  • No corner radius (0pt). Used for completely square edges.

    Declaration

    Swift

    public let none: CGFloat
  • xs

    Small corner radius (4pt). Used for subtle rounding on extra small elements or inputs.

    Declaration

    Swift

    public let xs: CGFloat
  • sm

    Small corner radius (4pt). Used for subtle rounding on small elements or inputs.

    Declaration

    Swift

    public let sm: CGFloat
  • md

    Medium corner radius (8pt). Used for buttons, cards, or modals with moderate rounding.

    Declaration

    Swift

    public let md: CGFloat
  • lg

    Large corner radius (16pt). Ideal for highly rounded containers, cards, or UI highlights.

    Declaration

    Swift

    public let lg: CGFloat
  • xl

    Large corner radius (28pt). Ideal for highly rounded containers, cards, or UI highlights.

    Declaration

    Swift

    public let xl: CGFloat
  • Fully rounded edges (9999pt). Commonly used for pills, tags, badges, or chip components.

    Declaration

    Swift

    public let pill: CGFloat
  • A predefined set of corner radius values for light mode.

    Declaration

    Swift

    public static let defaultLight: ThemeRadii
  • A predefined set of corner radius values for dark mode.

    Declaration

    Swift

    public static let defaultDark: ThemeRadii
  • Initializes a custom set of radius tokens.

    Declaration

    Swift

    public init(xs: CGFloat, sm: CGFloat, md: CGFloat, lg: CGFloat, xl: CGFloat, pill: CGFloat)
  • Returns a new ThemeRadii instance by copying the current one and applying the specified overrides.

    Only parameters you pass will be changed — others will retain their existing values.

    Declaration

    Swift

    func copy(
      xs: CGFloat? = nil,
      sm: CGFloat? = nil,
      md: CGFloat? = nil,
      lg: CGFloat? = nil,
      xl: CGFloat? = nil,
      pill: CGFloat? = nil
    ) -> ThemeRadii

    Parameters

    xs

    Override for the extra small radius token.

    sm

    Override for the small radius token.

    md

    Override for the medium radius token.

    lg

    Override for the large radius token.

    xl

    Override for the extra large radius token.

    pill

    Override for the pill radius token.

    Return Value

    A new ThemeRadii instance with the applied overrides.