---
title: "RoundedCornerShape"
description: "Creates [RoundedCornerShape] with the same size applied for all four corners."
type: "function"
---

<div class='type'>Function</div>


<a id='references'></a>
<div class='sourceset sourceset-common'>Common</div>


```kotlin
fun RoundedCornerShape(corner: CornerSize) = RoundedCornerShape(corner, corner, corner, corner)
```


Creates `RoundedCornerShape` with the same size applied for all four corners.

#### Parameters

| | |
| --- | --- |
| corner | `CornerSize` to apply. |




<div class='sourceset sourceset-common'>Common</div>


```kotlin
fun RoundedCornerShape(size: Dp) = RoundedCornerShape(CornerSize(size))
```


Creates `RoundedCornerShape` with the same size applied for all four corners.

#### Parameters

| | |
| --- | --- |
| size | Size in `Dp` to apply. |




<div class='sourceset sourceset-common'>Common</div>


```kotlin
fun RoundedCornerShape(size: Float) = RoundedCornerShape(CornerSize(size))
```


Creates `RoundedCornerShape` with the same size applied for all four corners.

#### Parameters

| | |
| --- | --- |
| size | Size in pixels to apply. |




<div class='sourceset sourceset-common'>Common</div>


```kotlin
fun RoundedCornerShape(percent: Int) = RoundedCornerShape(CornerSize(percent))
```


Creates `RoundedCornerShape` with the same size applied for all four corners.

#### Parameters

| | |
| --- | --- |
| percent | Size in percents to apply. |




<div class='sourceset sourceset-common'>Common</div>


```kotlin
fun RoundedCornerShape(
    topStart: Dp = 0.dp,
    topEnd: Dp = 0.dp,
    bottomEnd: Dp = 0.dp,
    bottomStart: Dp = 0.dp,
) =
    RoundedCornerShape(
        topStart = CornerSize(topStart),
        topEnd = CornerSize(topEnd),
        bottomEnd = CornerSize(bottomEnd),
        bottomStart = CornerSize(bottomStart),
    )
```


Creates `RoundedCornerShape` with sizes defined in `Dp`.



<div class='sourceset sourceset-common'>Common</div>


```kotlin
fun RoundedCornerShape(
    topStart: Float = 0.0f,
    topEnd: Float = 0.0f,
    bottomEnd: Float = 0.0f,
    bottomStart: Float = 0.0f,
) =
    RoundedCornerShape(
        topStart = CornerSize(topStart),
        topEnd = CornerSize(topEnd),
        bottomEnd = CornerSize(bottomEnd),
        bottomStart = CornerSize(bottomStart),
    )
```


Creates `RoundedCornerShape` with sizes defined in pixels.



<div class='sourceset sourceset-common'>Common</div>


```kotlin
fun RoundedCornerShape(
    @IntRange(from = 0, to = 100) topStartPercent: Int = 0,
    @IntRange(from = 0, to = 100) topEndPercent: Int = 0,
    @IntRange(from = 0, to = 100) bottomEndPercent: Int = 0,
    @IntRange(from = 0, to = 100) bottomStartPercent: Int = 0,
) =
    RoundedCornerShape(
        topStart = CornerSize(topStartPercent),
        topEnd = CornerSize(topEndPercent),
        bottomEnd = CornerSize(bottomEndPercent),
        bottomStart = CornerSize(bottomStartPercent),
    )
```


Creates `RoundedCornerShape` with sizes defined in percents of the shape's smaller side.

#### Parameters

| | |
| --- | --- |
| topStartPercent | The top start corner radius as a percentage of the smaller side, with a range of 0 - 100. |
| topEndPercent | The top end corner radius as a percentage of the smaller side, with a range of 0 - 100. |
| bottomEndPercent | The bottom end corner radius as a percentage of the smaller side, with a range of 0 - 100. |
| bottomStartPercent | The bottom start corner radius as a percentage of the smaller side, with a range of 0 - 100. |




