GuidesAPI ReferenceRelease Notes
HomeLog InHome
Guides

BlazeWidgetItemDurationElementStateStyle - iOS

The BlazeWidgetItemDurationElementStateStyle struct represents the configuration for the duration element of a widget item, for a specific state.

Properties

isVisible

var isVisible: Bool

indicates whether the duration element is visible.

📘

Make sure to set the parent indicator 'isVisible' property to true if toggled on.

backgroundColor

var backgroundColor: UIColor

The background color of the duration element.

backgroundImage

var backgroundImage: UIImage?

The background image of the duration element.

textStyle

var textStyle: BlazeWidgetItemTextStyle

The style configuration for the duration element text.

cornerRadius

var cornerRadius: CGFloat

The corner radius of the duration element.

cornerRadiusRatio

var cornerRadiusRatio: CGFloat?

The corner radius ratio is a value between 0.0 and 1.0, which computes the final corner radius for the duration element. Overrides corner radius property.
For example, a value of 0.5 on a 1:1 width/height item duration element will result in a perfect circle appearance for the duration element.

borderColor

var borderColor: UIColor

The color of the border.

borderWidth

var borderWidth: CGFloat

The width of the border.

glassBackground

var glassBackground: BlazeGlassBackgroundState

Controls whether the duration element renders a Liquid Glass background on iOS 26 and later instead of its flat background, tinted with backgroundColor. Defaults to .automatic in every state, so it follows Blaze.shared.isLiquidGlassEnabled. See Liquid Glass.


Did this page help you?