
Smooth iOS-style rounded corners and squircles with per-corner customizable radius and smoothing, type-safe smoothing API, presets (Subtle/Balanced/Smooth/Continuous), lightweight, allocation-friendly, integrates with UI components.
Smooth rounded corners and squircles for Compose Multiplatform.
Korner provides beautiful iOS-style smooth corner shapes and superellipses for Compose Multiplatform with fully customizable radius and smoothing values per corner.
Supports:
Based on the original smooth corner implementation by racra: https://github.com/racra/smooth-corner-rect-android-compose
Traditional rounded rectangles use simple circular arcs.
Korner generates smooth superellipse-style curves with more natural transitions and better visual balance — similar to modern design systems used in iOS and contemporary UI frameworks.
Compared to standard rounded corners, smooth corners:
repositories {
mavenCentral()
}dependencies {
implementation("io.github.dev778g-me:korner:2.0.0")
}Box(
modifier = Modifier
.size(200.dp)
.background(
color = Color(0xFFF6EABE),
shape = AbsoluteSmoothCornerShape(
cornerRadius = 32.dp,
cornerSmoothing = CornerSmoothing.Continuous
)
)
)Box(
modifier = Modifier
.size(200.dp)
.background(
color = Color(0xFFF6EABE),
shape = AbsoluteSmoothCornerShape(
topLeftRadius = 40.dp,
topLeftCornerSmoothing = CornerSmoothing.Continuous,
topRightRadius = 12.dp,
topRightCornerSmoothing = CornerSmoothing.Balanced,
bottomRightRadius = 40.dp,
bottomRightCornerSmoothing = CornerSmoothing.Smooth,
bottomLeftRadius = 12.dp,
bottomLeftCornerSmoothing = CornerSmoothing.Subtle
)
)
)Korner uses a type-safe CornerSmoothing API:
@JvmInline
value class CornerSmoothing(val percent: Int) {
init {
require(percent in 0..100) {
"Corner smoothing must be between 0 and 100"
}
}
companion object {
val Subtle = CornerSmoothing(25)
val Balanced = CornerSmoothing(50)
val Smooth = CornerSmoothing(75)
val Continuous = CornerSmoothing(100)
}
}| Preset | Value |
|---|---|
Subtle |
25 |
Balanced |
50 |
Smooth |
75 |
Continuous |
100 |
Custom values are also supported:
CornerSmoothing(65)Valid range: 0..100
Korner is adapted from: https://github.com/racra/smooth-corner-rect-android-compose
Original work copyright © racra.
Licensed under the MIT License.
Smooth rounded corners and squircles for Compose Multiplatform.
Korner provides beautiful iOS-style smooth corner shapes and superellipses for Compose Multiplatform with fully customizable radius and smoothing values per corner.
Supports:
Based on the original smooth corner implementation by racra: https://github.com/racra/smooth-corner-rect-android-compose
Traditional rounded rectangles use simple circular arcs.
Korner generates smooth superellipse-style curves with more natural transitions and better visual balance — similar to modern design systems used in iOS and contemporary UI frameworks.
Compared to standard rounded corners, smooth corners:
repositories {
mavenCentral()
}dependencies {
implementation("io.github.dev778g-me:korner:2.0.0")
}Box(
modifier = Modifier
.size(200.dp)
.background(
color = Color(0xFFF6EABE),
shape = AbsoluteSmoothCornerShape(
cornerRadius = 32.dp,
cornerSmoothing = CornerSmoothing.Continuous
)
)
)Box(
modifier = Modifier
.size(200.dp)
.background(
color = Color(0xFFF6EABE),
shape = AbsoluteSmoothCornerShape(
topLeftRadius = 40.dp,
topLeftCornerSmoothing = CornerSmoothing.Continuous,
topRightRadius = 12.dp,
topRightCornerSmoothing = CornerSmoothing.Balanced,
bottomRightRadius = 40.dp,
bottomRightCornerSmoothing = CornerSmoothing.Smooth,
bottomLeftRadius = 12.dp,
bottomLeftCornerSmoothing = CornerSmoothing.Subtle
)
)
)Korner uses a type-safe CornerSmoothing API:
@JvmInline
value class CornerSmoothing(val percent: Int) {
init {
require(percent in 0..100) {
"Corner smoothing must be between 0 and 100"
}
}
companion object {
val Subtle = CornerSmoothing(25)
val Balanced = CornerSmoothing(50)
val Smooth = CornerSmoothing(75)
val Continuous = CornerSmoothing(100)
}
}| Preset | Value |
|---|---|
Subtle |
25 |
Balanced |
50 |
Smooth |
75 |
Continuous |
100 |
Custom values are also supported:
CornerSmoothing(65)Valid range: 0..100
Korner is adapted from: https://github.com/racra/smooth-corner-rect-android-compose
Original work copyright © racra.
Licensed under the MIT License.