<!--
{
  "availability" : [
    "iOS: 17.0.0 -",
    "iPadOS: 17.0.0 -",
    "macCatalyst: 17.0.0 -",
    "macOS: 14.0.0 -",
    "tvOS: 17.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 10.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "SwiftUI",
  "identifier" : "/documentation/SwiftUI/Bindable",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "SwiftUI"
    ],
    "preciseIdentifier" : "s:7SwiftUI8BindableV"
  },
  "title" : "Bindable"
}
-->

# Bindable

A property wrapper type that supports creating bindings to the mutable
properties of observable objects.

```
@dynamicMemberLookup @propertyWrapper struct Bindable<Value>
```

## Overview

Use this property wrapper to create bindings to mutable properties of a
data model object that conforms to the
<doc://com.apple.documentation/documentation/Observation/Observable>
protocol. For example, the following code wraps the `book` input with
`@Bindable`. Then it uses a [`TextField`](/documentation/SwiftUI/TextField) to change the `title` property of
a book, and a [`Toggle`](/documentation/SwiftUI/Toggle) to change the `isAvailable` property, using the
`$` syntax to pass a binding for each property to those controls.

```
@Observable
class Book: Identifiable {
    var title = "Sample Book Title"
    var isAvailable = true
}

struct BookEditView: View {
    @Bindable var book: Book
    @Environment(\.dismiss) private var dismiss

    var body: some View {
        Form {
            TextField("Title", text: $book.title)

            Toggle("Book is available", isOn: $book.isAvailable)

            Button("Close") {
                dismiss()
            }
        }
    }
}
```

You can use the `Bindable` property wrapper on properties and variables to
an <doc://com.apple.documentation/documentation/Observation/Observable>
object. This includes global variables, properties that exists outside of
SwiftUI types, or even local variables. For example, you can create a
`@Bindable` variable within a view’s [`body`](/documentation/SwiftUI/View/body-8kl5o):

```
struct LibraryView: View {
    @State private var books = [Book(), Book(), Book()]

    var body: some View {
        List(books) { book in
            @Bindable var book = book
            TextField("Title", text: $book.title)
        }
    }
}
```

The `@Bindable` variable `book` provides a binding that connects
[`TextField`](/documentation/SwiftUI/TextField) to the `title` property of a book so that a person can make
changes directly to the model data.

Use this same approach when you need a binding to a property of an
observable object stored in a view’s environment. For example, the
following code uses the [`Environment`](/documentation/SwiftUI/Environment) property wrapper to retrieve an
instance of the observable type `Book`. Then the code creates a `@Bindable`
variable `book` and passes a binding for the `title` property to a
[`TextField`](/documentation/SwiftUI/TextField) using the `$` syntax.

```
struct TitleEditView: View {
    @Environment(Book.self) private var book

    var body: some View {
        @Bindable var book = book
        TextField("Title", text: $book.title)
    }
}
```

## Topics

### Creating a bindable value

[`init(_:)`](/documentation/SwiftUI/Bindable/init(_:))

Creates a bindable object from an observable object.

[`init(wrappedValue:)`](/documentation/SwiftUI/Bindable/init(wrappedValue:))

Creates a bindable object from an observable object.

[`init(projectedValue:)`](/documentation/SwiftUI/Bindable/init(projectedValue:))

Creates a bindable from the value of another bindable.

### Getting the value

[`wrappedValue`](/documentation/SwiftUI/Bindable/wrappedValue)

The wrapped object.

[`projectedValue`](/documentation/SwiftUI/Bindable/projectedValue)

The bindable wrapper for the object that creates bindings to its
properties using dynamic member lookup.

[`subscript(dynamicMember:)`](/documentation/SwiftUI/Bindable/subscript(dynamicMember:))

Returns a binding to the value of a given key path.



---

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)