androidx.compose.foundation
border
Function · from org.jetbrains.compose.foundation:foundation:1.12.2
No hand-written docs yet.
Modify element to add border with appearance specified with a border and a shape and clip it.
With border
fun Modifier.border(
border: BorderStroke,
shape: Shape = RectangleShape,
): T
border: BorderStrokeRequired
border: BorderStrokeRequiredBorderStroke class that specifies border appearance, such as size and color
shape: ShapeOptional
shape: ShapeOptionalDefault: RectangleShape
shape of the border
With color
fun Modifier.border(
width: Dp,
color: Color,
shape: Shape = RectangleShape,
): T
width: DpRequired
width: DpRequiredwidth of the border. Use Dp.Hairline for a hairline border.
color: ColorRequired
color: ColorRequiredcolor to paint the border with
Same as above: shape.
With brush
fun Modifier.border(
width: Dp,
brush: Brush,
shape: Shape,
)
brush: BrushRequired
brush: BrushRequiredbrush to paint the border with
Library docs
Modify element to add border with appearance specified with a border and a shape and clip it.