BackgroundScope
-
Cmn
@ExperimentalFoundationStyleApi
interface BackgroundScope
DrawStyleScope |
An interface that introduces the drawing property to a |
StyleScope |
A |
An interface that introduces the background property to a Style receiver scope.
| See also | |
|---|---|
StyleScope |
Summary
Public functions |
||
|---|---|---|
Unit |
background(color: Color)Sets the background color of the component. |
Cmn
|
Unit |
background(value: Brush)Sets the background of the component using a |
Cmn
|
Public functions
background
fun background(color: Color): Unit
Sets the background color of the component. If a ShapeScope.shape is applied, the background will fill that shape.
Setting a background color will override any previously set background brush.
This property is not inherited
| Parameters | |
|---|---|
color: Color |
The background color. |
| See also | |
|---|---|
shape |
|
background |
background
fun background(value: Brush): Unit
Sets the background of the component using a Brush. This allows for gradient backgrounds or other complex fills. If a ShapeScope.shape is applied, the background will fill that shape.
Setting a background brush will override any previously set background color.
This property is not inherited
| Parameters | |
|---|---|
value: Brush |
The brush to use for the background. |
| See also | |
|---|---|
shape |
|
background |