Card

A component that serves as a container for provided content.

Preview

Card Preview

Code Example

let model = CardVM {
  $0.borderWidth = .large
  $0.cornerRadius = .small
  $0.shadow = .large
  if #available(iOS 26.0, *) {
    $0.backgroundStyle = .liquidGlass
  }
  $0.backgroundColor = .accentBackground
}

API

CardVM Props

A model that defines the appearance properties for a card component.

NameTypeDefaultDescription
animationScaleAnimationScalemediumThe scaling factor for the card's tap animation, with a value between 0 and 1.
backgroundColorUniversalColor?nilThe background color of the card.
backgroundStyleBackgroundStylesolidThe background material style. Supports .solid, .blur, and iOS 26 .liquidGlass.
borderColorUniversalColordividerThe border color of the card.
borderWidthBorderWidthmediumThe border thickness of the card.
contentPaddingsPaddingsPaddings(padding: 16)The padding applied to the card's content area.
cornerRadiusComponentRadiusmediumThe corner radius of the card.
isTappableBoolfalseA Boolean value indicating whether the card should allow to be tapped.
shadowShadowmediumThe shadow of the card.

SUCard

public init(
  model: CardVM = .init(),
  content: @escaping () -> Content
)

UKCard

Initializers

public init(
  model: CardVM = .init(),
  content: @escaping () -> Content
)

Public Properties

NameTypeDescription
modelCardVMA model that defines the appearance properties.

Public Subviews

NameTypeDescription
contentContentThe primary content of the card, provided as a custom view.