---
title: "init(key:)"
framework: appkit
role: symbol
role_heading: Initializer
path: "appkit/nsdraggingimagecomponent/init(key:)"
---

# init(key:)

Initializes and returns a dragging image component with the specified key.

## Declaration

```swift
init(key: NSDraggingItem.ImageComponentKey)
```

## Parameters

- `key`: The key.

## Return Value

Return Value An initialized dragging image component with the specified key.

## Discussion

Discussion This method is the designated initializer.

## See Also

### Related Documentation

- [Drag and Drop](appkit/drag-and-drop.md)
