<!--
{
  "availability" : [
    "iOS: 16.0.0 -",
    "iPadOS: 16.0.0 -",
    "macCatalyst: 16.0.0 -",
    "macOS: 13.0.0 -",
    "tvOS: 16.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 9.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "SwiftUI",
  "identifier" : "/documentation/SwiftUI/Image/init(_:variableValue:bundle:label:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "SwiftUI"
    ],
    "preciseIdentifier" : "s:7SwiftUI5ImageV_13variableValue6bundle5labelACSS_SdSgSo8NSBundleCSgAA4TextVtcfc"
  },
  "title" : "init(_:variableValue:bundle:label:)"
}
-->

# init(_:variableValue:bundle:label:)

Creates a labeled image that you can use as content for controls, with
the specified label and variable value.

```
init(_ name: String, variableValue: Double?, bundle: Bundle? = nil, label: Text)
```

## Parameters

`name`

The name of the image resource to lookup.

`variableValue`

An optional value between `0.0` and `1.0` that
the rendered image can use to customize its appearance, if
specified. If the symbol doesn’t support variable values, this
parameter has no effect.

`bundle`

The bundle to search for the image resource. If
`nil`, SwiftUI uses the main `Bundle`. Defaults to `nil`.

`label`

The label associated with the image. SwiftUI uses
the label for accessibility.

## Discussion

This initializer creates an image using a using a symbol in the
specified bundle. The rendered symbol may alter its appearance to
represent the value provided in `variableValue`.

> Note: See WWDC22 session 
> [10158: Adopt variable color in SF
> Symbols](https://developer.apple.com/wwdc22/10158/) for details on
> how to create symbols that support variable values.

---

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)