---
title: square
framework: swiftui
role: symbol
role_heading: Type Property
path: swiftui/symbolvariants/square-swift.type.property
---

# square

A variant that encapsulates the symbol in a square.

## Declaration

```swift
static let square: SymbolVariants
```

## Discussion

Discussion Use this variant with a call to the symbolVariant(_:) modifier to draw symbols in a square, for those symbols that have a square variant: VStack(spacing: 20) {     HStack(spacing: 20) {         Image(systemName: "flag")         Image(systemName: "heart")         Image(systemName: "bolt")         Image(systemName: "star")     }     HStack(spacing: 20) {         Image(systemName: "flag")         Image(systemName: "heart")         Image(systemName: "bolt")         Image(systemName: "star")     }     .symbolVariant(.square) }

## See Also

### Getting symbol variants

- [none](swiftui/symbolvariants/none.md)
- [circle](swiftui/symbolvariants/circle-swift.type.property.md)
- [rectangle](swiftui/symbolvariants/rectangle-swift.type.property.md)
- [fill](swiftui/symbolvariants/fill-swift.type.property.md)
- [slash](swiftui/symbolvariants/slash-swift.type.property.md)
