<!--
{
  "availability" : [
    "iOS: 18.1.0 -",
    "iPadOS: 18.1.0 -",
    "macCatalyst: 18.1.0 -",
    "macOS: 15.1.0 -",
    "visionOS: 2.1.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "SwiftUI",
  "identifier" : "/documentation/SwiftUI/TabContent/draggable(_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "SwiftUI"
    ],
    "preciseIdentifier" : "s:7SwiftUI10TabContentPAAE9draggableyQrqd__yXA16CoreTransferable0G0Rd__lF"
  },
  "title" : "draggable(_:)"
}
-->

# draggable(_:)

Activates this tab as the source of a drag and drop operation.
This tab can only be dragged when in the sidebar.

```
@MainActor @preconcurrency func draggable<T>(_ payload: @autoclosure @escaping () -> T) -> some TabContent<Self.TabValue> where T : Transferable
```

## Parameters

`payload`

A closure that returns a single
instance or a value conforming to <doc://com.apple.documentation/documentation/CoreTransferable/Transferable> that
represents the draggable data from this tab.

## Discussion

Applying the `draggable(_:)` modifier adds the appropriate gestures for
drag and drop to this tab. When a drag operation begins, a rendering of
the tab is generated and used as the preview image.

The following example allows the ‘Family’ tab to be dragged and dropped.

```
TabView {
    Tab("Family", systemImage: "list.bullet") {
        MyFamilyView()
    }
    .draggable(AppSections.family)
}
```

---

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)