Compose Unstyled 2.0 is out! Check the official announcement blog ->
Function

contentPadding

Sets the padding for all four edges (top, end, bottom, start) edges of the component's content.

contentPadding

Source set: Common
@ExperimentalFoundationStyleApi
fun ContentPaddingScope.contentPadding(value: Dp)

Sets the padding for all four edges (top, end, bottom, start) edges of the component's content. Content padding is the space between the component's border (if any) and its content. The width/height of the component includes content padding.

This property is not inherited

Parameters

value The amount of padding to apply to all four edges.

contentPadding

Source set: Common
@ExperimentalFoundationStyleApi
fun ContentPaddingScope.contentPadding(start: Dp, top: Dp, end: Dp, bottom: Dp)

Sets the padding for all four edges (top, end, bottom, start) edges of the component's content. Content padding is the space between the component's border (if any) and its content. The width/height of the component includes content padding.

This property is not inherited

Parameters

start The padding for the start edge.
top The padding for the top edge.
end The padding for the end edge.
bottom The padding for the bottom edge.

contentPadding

Source set: Common
@ExperimentalFoundationStyleApi
fun ContentPaddingScope.contentPadding(horizontal: Dp, vertical: Dp)

Sets the padding for the vertical (top and bottom) and horizontal (start and end) edges of the component's content. Content padding is the space between the component's border (if any) and its content. The width/height of the component includes content padding.

This property is not inherited

Parameters

vertical The padding for the top and bottom edges.
horizontal The padding for the start and end edges.

contentPadding

Source set: Common
@ExperimentalFoundationStyleApi
fun <T> T.contentPadding(paddingValues: PaddingValues)
    where T : ContentPaddingScope, T : CompositionLocalAccessorScope

Sets the padding for the component's content. Content padding is the space between the component's border (if any) and its content. The width/height of the component includes content padding.

This property is not inherited

Parameters

paddingValues The PaddingValues to apply to the content.

Last updated: