Circular Progress

A component that displays the progress of a task or operation in a circular form.

Preview

Button Preview

Code Example

let model = CircularProgressVM {
  $0.currentValue = 10
  $0.label = "10%"
  $0.size = .large
  $0.shape = .arc
  $0.lineCap = .square
}

API

CircularProgressVM Props

A model that defines the appearance properties for a circular progress component.

NameTypeDefaultDescription
colorComponentColoraccentThe color of the circular progress.
currentValueCGFloat0The current value of the circular progress.
fontUniversalFont?nilThe font used for the circular progress label text.
labelString?nilAn optional label to display inside the circular progress.
lineCapLineCaproundedThe style of line endings.
lineWidthCGFloat?nilThe width of the circular progress stroke.
maxValueCGFloat100The maximum value of the circular progress.
minValueCGFloat0The minimum value of the circular progress.
shapeShapecircleThe shape of the circular progress indicator.
sizeComponentSizemediumThe size of the circular progress.

SUCircularProgress

public init(model: CircularProgressVM)

UKCircularProgress

Initializers

public init(model: CircularProgressVM)

Public Properties

NameTypeDescription
modelCircularProgressVMA model that defines the appearance properties.
currentValueCGFloatThe current progress value.

Public Subviews

NameTypeDescription
backgroundLayerCAShapeLayerThe shape layer responsible for rendering the background.
progressLayerCAShapeLayerThe shape layer responsible for rendering the progress arc.
labelUILabelThe label used to display text.