# init Binding

[SwiftUI](../../../..) ⟩ [Data Flow](../../../../data-flow) ⟩ [Binding]() ⟩ init

{% tabs %}
{% tab title="💾 程式" %}
```swift
// custom control
struct SlidersForSize: View {
    @Binding var size: CGSize    // ⭐️ Binding variable
    var body: some View { ... }
}

extension SlidersForSize {
    init(_ size: Binding<CGSize>) {
        self._size = size        // ⭐️ 注意：不是 `self.size = size` ❗️❗️❗️
    }
}
```
{% endtab %}

{% tab title="💈範例" %}
* [sizeratiocontrol](../../../layout/grids/examples/itemsview/sizeratiocontrol "mention")
{% endtab %}

{% tab title="👥 相關" %}
* compare: [init-state](../../value/state/init-state "mention").
{% endtab %}
{% endtabs %}
