---
title: "init(_:image:value:role:content:)"
framework: swiftui
role: symbol
role_heading: Initializer
path: "swiftui/tab/init(_:image:value:role:content:)"
---

# init(_:image:value:role:content:)

Creates a tab that the tab view presents when the tab view’s selection matches the tab’s value, with a localized string key label.

## Declaration

```swift
nonisolated init(_ titleKey: LocalizedStringKey, image: String, value: Value, role: TabRole?, @ContentBuilder content: () -> Content) where Label == DefaultTabLabel
```

## Parameters

- `titleKey`: The localized string key label for the tab’s tab item.
- `image`: The image for the tab’s tab item.
- `value`: The selection value which selects this tab.
- `role`: The role defining the semantic purpose of the tab.
- `content`: The view content of the tab.

## See Also

### Creating a tab with image

- [init(_:image:content:)](swiftui/tab/init(_:image:content:).md)
- [init(_:image:value:content:)](swiftui/tab/init(_:image:value:content:).md)
- [init(_:image:role:content:)](swiftui/tab/init(_:image:role:content:).md)
