Material configuration. Can be a material type string or a configuration object.
Support
Usage
As a standalone view
Material can be used directly as a view that fills its frame with a blur effect:
A translucent blur effect similar to frosted glass, used for backgrounds that blend with content behind them.
Material(props?: MaterialProps): Material;
Show Material type strings
Material can be used directly as a view that fills its frame with a blur effect:
Material("thin")
.frame({ width: 200, height: 200 })
Text("Over blurred background")
.padding(16)
.background(Material("thin"))
.cornerRadius(12)
VStack({ spacing: 16 }, [
Text("Ultra Thin").padding(12).background(Material("ultraThin")),
Text("Thin").padding(12).background(Material("thin")),
Text("Regular").padding(12).background(Material("regular")),
Text("Thick").padding(12).background(Material("thick"))
])
Material({
type: "regular",
opacity: 0.8,
blurRadius: 20
})
Text("Frosted Text")
.font("largeTitle")
.foregroundStyle(Material("thin"))