🌈 Create new beautiful Compose Gradients with our new wesite ->
Compose Modifier

border

Modify element to add border with appearance specified with a border and a shape and clip it.

border

Source set: Common
public fun Modifier.border(border: BorderStroke, shape: Shape = RectangleShape): Modifier

Modify element to add border with appearance specified with a border and a shape and clip it.

Parameters

border BorderStroke class that specifies border appearance, such as size and color
shape shape of the border

border

Source set: Common
public fun Modifier.border(width: Dp, color: Color, shape: Shape = RectangleShape): Modifier

Modify element to add border with appearance specified with a width, a color and a shape and clip it.

Parameters

width width of the border. Use Dp.Hairline for a hairline border.
color color to paint the border with
shape shape of the border

border

Source set: Common
public fun Modifier.border(width: Dp, brush: Brush, shape: Shape): Modifier

Modify element to add border with appearance specified with a width, a brush and a shape and clip it.

Parameters

width width of the border. Use Dp.Hairline for a hairline border.
brush brush to paint the border with
shape shape of the border