---
title: init()
framework: swiftui
role: symbol
role_heading: Initializer
path: swiftui/buttontogglestyle/init()
---

# init()

Creates a button toggle style.

## Declaration

```swift
nonisolated init()
```

## Discussion

Discussion Don’t call this initializer directly. Instead, use the button static variable to create this style: Toggle(isOn: $isFlagged) {     Label("Flag", systemImage: "flag.fill") } .toggleStyle(.button)
