2020-03-30a few seconds read (About 37 words)How to toggle with animation in SwiftUIIssue #632 Use Group 12345678910111213141516171819private func makeHeader() -> some View { Group { if showsSearch { SearchView( onSearch: onSearch ) .transition(.move(edge: .leading)) } else { InputView( onAdd: onAdd ) .transition(.move(edge: .leading)) } }}withAnimation { self.showsSearch.toggle()}#swiftmacOSswiftUI