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

# init(role:content:)

Creates a new tab that you can use in a tab view, with an empty label.

## Declaration

```swift
init(role: TabRole?, @ContentBuilder content: () -> Content) where Label == DefaultTabLabel
```

## Parameters

- `role`: The role defining the semantic purpose of the tab.
- `content`: The view content of the tab.

## See Also

### Creating a tab

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