Skip to main content
.scrollContentBackground(visibility: "hidden" | "visible"): Component
visibility
"hidden" | "visible"
required
Whether to show or hide the default background. Use "hidden" to remove the system background from Lists and other scrollable containers.

Support

Usage

Hide list background

Remove the default grouped list background to show a custom background underneath.
List([
    Section("Settings", [
        Text("Account"),
        Text("Notifications"),
        Text("Privacy"),
    ])
])
    .scrollContentBackground("hidden")
    .background(Color("blue"))

Transparent text editor

const body = () => {
    const [text, setText] = useState("")
    return TextEditor({ text, setText })
        .scrollContentBackground("hidden")
        .background(Material("thin"))
}