CheckboxShape

public enum CheckboxShape : Equatable

Represents the visual shape of a button used in themed UI components.

This enum defines several commonly used button shapes, including:

  • Square: No rounding.
  • Rounded: Medium rounding using the theme’s default radius.
  • Capsule: Fully rounded pill shape.
  • Custom: Developer-defined corner radius.
  • A square button with no corner radius.

    Declaration

    Swift

    case square
  • A rounded button using the theme’s medium radius (ThemeRadii.md).

    Declaration

    Swift

    case rounded
  • A circle checkbox

    Declaration

    Swift

    case circle
  • A custom shape with a specific corner radius.

    Declaration

    Swift

    case custom(cornerRadius: CGFloat)

    Parameters

    cornerRadius

    The radius in points to use.

  • Resolves the numeric corner radius based on the selected shape and current theme.

    Declaration

    Swift

    public func radius(for theme: Theme) -> CGFloat

    Parameters

    theme

    The theme from which to pull radius values.

    Return Value

    A CGFloat representing the radius to apply.

  • Custom equality check that treats any two .custom shapes as equal, regardless of the actual radius value.

    Declaration

    Swift

    public static func == (lhs: CheckboxShape, rhs: CheckboxShape) -> Bool