Skip to content

iOS components Layout

stanceSurface()

Stable

Modifier that places a view on a token surface level with a corner radius, border and optional shadow.

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

Preview

Rendered by the SwiftUI library, not drawn by hand.

stanceSurface() on iOS and iPadOSstanceSurface() on iOS and iPadOSstanceSurface() on iOS and iPadOS
stanceSurface(), Light appearance
Light
stanceSurface(), Dark appearance
Dark
stanceSurface(), High contrast appearance
High contrast

Usage

swift
Text("Content").padding().stanceSurface(.subtle)

Accessibility

  • Boundaries meet 3:1 contrast in every theme

On other platforms