Skip to content

iOS components Layout

stanceCard()

Stable

Modifier that gives any view the card treatment: padding, surface colour, border and optional elevation.

  • PlatformiOS and iPadOS, SwiftUI
  • Builds onA custom Stance component
  • Kindmodifier

Preview

Rendered by the SwiftUI library, not drawn by hand.

stanceCard() on iOS and iPadOSstanceCard() on iOS and iPadOSstanceCard() on iOS and iPadOS
stanceCard(), Light appearance
Light
stanceCard(), Dark appearance
Dark
stanceCard(), High contrast appearance
High contrast

Usage

swift
Text("Content").stanceCard(elevated: true)

Accessibility

  • High contrast replaces the shadow with a solid outline

On other platforms