Interface

ForegroundScope

An interface that introduces the foreground property to a Style receiver scope.

Source set: Common
@Deprecated(
    DeprecatedStyleScope,
    replaceWith = ReplaceWith(""),
    level = DeprecationLevel.WARNING,
)
public interface ForegroundScope

An interface that introduces the foreground property to a Style receiver scope.

Functions

foreground

Source set: Common
public fun foreground(value: Color)

Sets the foreground color for 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 ShapeScope.shape is applied, the foreground will fill that shape.

This property is not inherited

Parameters

value The brush to use for the foreground.

foreground

Source set: Common
public fun foreground(value: Brush)

Sets the foreground brush for the component. This can be used to overlay a color or gradient 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 ShapeScope.shape is applied, the foreground will fill that shape.

This property is not inherited

Parameters

value The brush to use for the foreground.
Jetpack Compose beyond MaterialFree components, screens and templates for apps that don’t look like Google’s. Copy them into your app, or let your coding agent add them.Browse for free

Content updated: