Concept

  • Modifiers are chainable methods that adjust a view’s appearance or behavior.
  • Common modifiers include .background(Color) for setting a background and .cornerRadius(value) for rounding corners.

Example

Text("Hello, World!")
    .background(Color.red)
    .cornerRadius(10)

Source