---
title: "init(dictionaryLiteral:)"
framework: swift
role: symbol
role_heading: Initializer
path: "swift/keyvaluepairs/init(dictionaryliteral:)"
---

# init(dictionaryLiteral:)

Creates a new KeyValuePairs instance from the given dictionary literal.

## Declaration

```swift
init(dictionaryLiteral elements: (Key, Value)...)
```

## Discussion

Discussion The order of the key-value pairs is kept intact in the resulting KeyValuePairs instance.
