Try this (as found here: https://stackoverflow.com/questions/65865182/transparent-background-for-texteditor-in-swiftui)
extension NSTextView {
open override var frame: CGRect {
didSet {
backgroundColor = .clear
drawsBackground = true
}
}
}
struct ContentView: View {
@State var text = ""
var body: some View {				
TextEditor(text: $text)					
.background(Color.red)		
}
}
Topic:
UI Frameworks
SubTopic:
SwiftUI
Tags: