<!--
{
  "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/EnvironmentValues/symbolVariants",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "SwiftUI"
    ],
    "preciseIdentifier" : "s:7SwiftUI17EnvironmentValuesV14symbolVariantsAA06SymbolF0Vvp"
  },
  "title" : "symbolVariants"
}
-->

# symbolVariants

The symbol variant to use in this environment.

```
var symbolVariants: SymbolVariants { get set }
```

## Discussion

You set this environment value indirectly by using the
[`symbolVariant(_:)`](/documentation/SwiftUI/View/symbolVariant(_:)) view modifier. However, you access the
environment variable directly using the [`environment(_:_:)`](/documentation/SwiftUI/View/environment(_:_:))
modifier. Do this when you want to use the [`none`](/documentation/SwiftUI/SymbolVariants/none)
variant to ignore the value that’s already in the environment:

```
HStack {
    Image(systemName: "heart")
    Image(systemName: "heart")
        .environment(\.symbolVariants, .none)
}
.symbolVariant(.fill)
```

![A screenshot of two heart symbols. The first is filled while the](images/com.apple.SwiftUI/SymbolVariants-none-1@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)