Skip to content

Spinner - Frameworks

A spinner informs users about the loading of content.

AndroidreleasediOSreleased

iOS

Syntax

swift
Warp.Spinner(
    size: SpinnerSize = .default,
    duration: CGFloat = 1,
    lineWidth: CGFloat = 3
)
swift
Warp.Spinner(size: .large)

Visual options

There are a variety of variants supported for the Spinner component:

swift
enum Warp.SpinnerSize {        
    case small
    case `default`
    case large
    case custom(Double)
}

Legacy support

By default all Warp components return a SwiftUI View but there is always a UIKit UIView available to use also.

swift
Warp.Spinner(size: .large).uiView

Parameters

Optional Props

NameTypeDefaultDescription
sizeWarp.SpinnerSize.defaultSize of the Spinner. Use one of the predefined SpinnerSize values: .small, .default, .large, or .custom.
durationCGFloat1Duration of Spinner animation
lineWidthCGFloat3The thickness of the Spinner

Questions?

Feel free to ask any questions on usage in the Warp DS Slack channel: #warp-design-system