public class AppearanceScope
The scope of the block in the appearance modifier.
Properties
background
public var background: Fill = Fill.None
Fills the background of the component. If a shape is set, the background will fill that shape. The default shape is RectangleShape.
The default value is Fill.None which will not fill the background.
foreground
public var foreground: Fill = Fill.None
Fills the foreground color of the component. This can be used to overlay a color on top of the component's content. It is important that this brush be partially transparent (e.g. alpha less than 1.0) or it will obscure the content. If a shape is set, the foreground will fill that shape.
The default value is Fill.None which will not fill the foreground.
borderWidth
public var borderWidth: Dp = Dp.Unspecified
Sets the width of the border around the component. The border is drawn on top of the background and the padded content. The border's width does not contribute to the component's layout size (width/height); it is rendered within the component's bounds This method only sets the width; color or brush must be set separately.
Specifying a Dp.Unspecified value will remove the border.
Specifying a Dp.Hairline or 0.dp value will create 1 pixel border regardless of density.
The default value is Dp.Unspecified.
border
public var border: Fill = Fill.None
Sets how the border is filled around the component. The border is drawn on top of the background. This method only sets the fill; width must be by borderWidth. Both must be set for a border to be drawn. The border's presence and appearance do not affect the component's layout size.
The Default value is Fill.None which doesn't draw a border.
dropShadow
public var dropShadow: Shadows = Shadows.None
Applies a drop shadow effect directly to the component, often used for text or specific graphics. This is distinct from shadowElevation which is specific to platform elevation shadows. Te border and overall layout size are not affected by this shadow.
Multiple shadows can be applied, using Shadows.Compound, and will be drawn together.
If shape is set, the shadow will be applied to the shape's bounds.
The default value is Shadows.None which doesn't draw a shadow.
innerShadow
public var innerShadow: Shadows = Shadows.None
Applies an inner shadow effect to the component. This shadow is drawn inside the bounds of the component.The border and overall layout size are not affected by this shadow.
Multiple shadows can be applied, using Shadows.Compound, and will be drawn together.
If shape is set, the shadow will be applied to the shape's bounds.
The default value is Shadows.None which doesn't draw a shadow.
shape
public var shape: Shape = RectangleShape
Defines the Shape to use for shape background rendering (background), foreground rendering (foreground) and border rendering (border).
If shape is not specified then a RectangleShape is used.