Text("Your text", modifier = Modifier .border(width = 1.dp, color = Color(0xFF908787), shape = RoundedCornerShape(5.dp)) )
Use modifier border .it works properly in my case.