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
backgroundColorUniversalColor?nilThe background 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.
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.