Function

border

Draws a border around the element.

border

Source set: JvmAndAndroid
public fun RemoteModifier.border(
    width: RemoteDp,
    color: RemoteColor,
    shape: RemoteShape = RemoteRectangleShape,
): RemoteModifier

Draws a border around the element.

Example of drawing a rounded border around a composable:

Parameters

width The width of the border.
color The color of the border.
shape The shape of the border. When RemoteRoundedCornerShape is used, only the RemoteRoundedCornerShape.topStart corner size is currently taken into consideration for all corners.

Return

a RemoteModifier that draws a border around the element

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: