Card

A component that serves as a container for provided content.

Preview

Avatar Preview

Code Example

let model = CardVM {
  $0.borderWidth = .large
  $0.cornerRadius = .small
  $0.shadow = .large
  $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.
backgroundColorUniversalColorbackgroundThe background color of the card.
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.