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

# rectangle

A variant that encapsulates the symbol in a rectangle.

## Declaration

```swift
static let rectangle: SymbolVariants
```

## Discussion

Discussion Use this variant with a call to the symbolVariant(_:) modifier to draw symbols in a rectangle, for those symbols that have a rectangle variant: VStack(spacing: 20) {     HStack(spacing: 20) {         Image(systemName: "plus")         Image(systemName: "minus")         Image(systemName: "xmark")         Image(systemName: "checkmark")     }     HStack(spacing: 20) {         Image(systemName: "plus")         Image(systemName: "minus")         Image(systemName: "xmark")         Image(systemName: "checkmark")     }     .symbolVariant(.rectangle) }

## See Also

### Getting symbol variants

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