curvedtext-kmp
0.0.2indexedRender text along circular arcs — upward or downward — with auto-sizing canvas, full typographic styling, and a drop-in UI component for decorative curved text.
Render text along circular arcs — upward or downward — with auto-sizing canvas, full typographic styling, and a drop-in UI component for decorative curved text.
A Kotlin Multiplatform Compose library that lets you render text curved along a circular arc — like a rainbow ☀️ or a frown 🙃. Works across Android, iOS, Desktop, and WebAssembly!
Text()| Platform | Supported |
|---|---|
| Android | ✅ |
| iOS | ✅ |
Add the dependency to your commonMain source set:
// build.gradle.kts
commonMain.dependencies {
implementation("com.dontsaybojio:curvedtext:x.x.x")
}

CurvedText(
text = "Hello Rainbow Text!",
radius = 200.dp
)

CurvedText(
text = "Curved Downward",
radius = (-150).dp,
color = Color.Blue
)

CurvedText(
text = "CURVED HEADLINE",
radius = 150.dp,
style = MaterialTheme.typography.headlineSmall.copy(
fontWeight = FontWeight.Bold,
color = Color(0xFF6200EE)
)
)

CurvedText(
text = "Stylish Curve ✨",
radius = 120.dp,
fontSize = 20.sp,
fontWeight = FontWeight.SemiBold,
color = Color(0xFFFF6B35),
letterSpacing = 2.sp
)
💡 Tip: A larger
radiuscreates a gentler, more subtle curve. A smallerradiuscreates a tighter, more dramatic arc!
CurvedText@Composable
fun CurvedText(
text: String,
radius: Dp,
modifier: Modifier = Modifier,
style: TextStyle = LocalTextStyle.current,
color: Color = Color.Unspecified,
fontSize: = TextUnit.Unspecified,
fontStyle: ? = ,
fontWeight: ? = ,
fontFamily: ? = ,
letterSpacing: = TextUnit.Unspecified,
textDecoration: ? = ,
)
Contributions are welcome! Feel free to open an issue or submit a pull request on GitHub. Whether it's a bug fix, a new feature idea, or just improving the docs — all help is appreciated! 💪
| Desktop (JVM) | ✅ |
| WebAssembly | ✅ |
| Parameter | Type | Description |
|---|
text | String | The text to display along the curve |
radius | Dp | Curve radius. Positive = upward (smile 😊), Negative = downward (frown 🙁). Larger absolute values = gentler curve |
modifier | Modifier | Standard Compose modifier |
style | TextStyle | Base text style — merged with individual parameters |
color | Color | Text color. Falls back to the color in style if unspecified |
fontSize | TextUnit | Font size |
fontStyle | FontStyle? | Italic, normal, etc. |
fontWeight | FontWeight? | Bold, medium, thin, etc. |
fontFamily | FontFamily? | Custom font family |
letterSpacing | TextUnit | Space between characters |
textDecoration | TextDecoration? | Underline, line-through, etc. |
Surfaced from shared tags and platforms — no rankings paid for.