Passing a Binding Down
Send state into a subview with the dollar sign.
Passing a Binding Down is a free SwiftUI Academy lesson on CoddyKit — lesson 2 of 4. You can read the complete lesson below for free — then practise it hands-on in the browser with a built-in code editor and a 24/7 AI tutor. It is part of the SwiftUI Academy learning path, one of 4 lessons in the course, and your progress syncs across the web and the CoddyKit app.
The Dollar Sign
To turn @State into a binding you pass it, prefix the property with a dollar sign. That hands the child a live connection.
Value vs Binding
Plain name gives the current value. The dollar-prefixed name gives the binding. Same property, two ways to use it.
var count = 0
// count -> the value
// $count -> the bindingOwning the State
The parent declares the source with @State. Only the owner of state can create a binding from it.
struct Parent: View {
@State private var isOn = false
var body: some View { Text("Placeholder") }
}Handing It Off
Inside the parents body, pass the binding into the child by writing the property name with a dollar sign in front.
var body: some View {
ChildView(isOn: $isOn)
}The Child Receives It
The child stores the connection in a @Binding property. Its type matches the value, like Bool or String.
struct ChildView: View {
@Binding var isOn: Bool
var body: some View { Toggle("On", isOn: $isOn) }
}Types Must Match
A binding to a Bool plugs only into a @Binding var isOn: Bool. Mismatched types stop the build until you fix them.
Editing Flows Up
When the child flips its toggle, the change travels straight back to the parents @State. The parent re-renders automatically.
Forgot the Dollar Sign?
Pass the bare value where a binding is expected and Swift complains. The dollar sign is what makes it a binding.
Bindings Go Deep
A child can pass its binding further down to its own children. The same dollar sign threads state through many layers.
Read in the Child
Inside the child, use the plain name to read the current value and the dollar name when a control needs the binding back.
Text(isOn ? "On" : "Off")
Toggle("Power", isOn: $isOn)One Line, Two Way
That single dollar-prefixed argument wires up full two-way sync. Tiny syntax, big power behind the binding. ⚡
Quick Check
Quick check on passing bindings.
Recap: The Dollar Sign Bridge
Own state with @State, pass it down with the dollar sign, receive it as @Binding. That bridge keeps parent and child in sync. 🌉
Frequently asked questions
Is the “Passing a Binding Down” lesson free?
Yes — the full text of “Passing a Binding Down” is free to read here on the web, and the SwiftUI Academy course includes 4 lessons in total. To practise it interactively (a built-in code editor and a 24/7 AI tutor) and unlock the rest of the SwiftUI Academy course, upgrade to CoddyKit PRO.
What will I learn in “Passing a Binding Down”?
Send state into a subview with the dollar sign. You practise SwiftUI Academy with hands-on code you run directly in the browser, and a 24/7 AI tutor answers your questions as you work through the lesson.
Do I need any experience to start SwiftUI Academy?
No prior experience is required. SwiftUI Academy on CoddyKit is structured for beginners through advanced learners; this is — lesson 2 of 4, so you can start here or from the beginning and move at your own pace.
How long does the “Passing a Binding Down” lesson take?
Most CoddyKit lessons take about 5–10 minutes. Each one is bite-sized and interactive, so you make steady progress and pick up exactly where you left off across the web and the app.
Can I write and run code in this SwiftUI Academy lesson?
Yes. Every SwiftUI Academy lesson includes a built-in code editor, so you write and run real code right in your browser and get instant AI feedback — no local setup required.
All lessons in this course
- Why Children Need @Binding
- Passing a Binding Down
- Building a Reusable Toggle Row
- @State vs @Binding