<!--
{
  "availability" : [
    "iOS: 15.0.0 -",
    "iPadOS: 15.0.0 -",
    "macCatalyst: 15.0.0 -",
    "macOS: 12.0.0 -",
    "tvOS: 15.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 8.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "SwiftUI",
  "identifier" : "/documentation/SwiftUI/SymbolVariants/square-swift.property",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "SwiftUI"
    ],
    "preciseIdentifier" : "s:7SwiftUI14SymbolVariantsV6squareACvp"
  },
  "title" : "square"
}
-->

# square

A version of the variant that’s encapsulated in a square.

```
var square: SymbolVariants { get }
```

## Discussion

Use this property to modify a variant like [`fill`](/documentation/SwiftUI/SymbolVariants/fill-swift.property)
so that it’s also contained in a square:

```
Label("Fill Square", systemImage: "star")
    .symbolVariant(.fill.square)
```

![A screenshot of a label that shows a star in a filled square](images/com.apple.SwiftUI/SymbolVariants-square-2@2x.png)

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)