---
title: wrappedValue
framework: swiftui
role: symbol
role_heading: Instance Property
path: swiftui/lazystate/wrappedvalue
---

# wrappedValue

The underlying value referenced by the state variable.

## Declaration

```swift
var wrappedValue: Value { get nonmutating set }
```

## Discussion

Discussion This property provides primary access to the value’s data. However, you don’t typically access wrappedValue explicitly. Instead, you gain access to the wrapped value by referring to the property variable that you create with the @LazyState attribute. In the following example, the button’s label depends on the value of isPlaying and the button’s action toggles the value of isPlaying. Both of these accesses implicitly access the state property’s wrapped value: struct PlayButton: View {     @LazyState private var isPlaying: Bool = false

var body: some View {         Button(isPlaying ? "Pause" : "Play") {             isPlaying.toggle()         }     } }

## See Also

### Getting the value

- [projectedValue](swiftui/lazystate/projectedvalue.md)
