explaingit

dev778g-me/korner

12KotlinAudience · developerComplexity · 2/5LicenseSetup · easy

TLDR

A Kotlin library for Compose Multiplatform that replaces standard circular corner rounding with superellipse (squircle) curves, giving UI elements smoother, more visually refined corners across Android, iOS, desktop, and web from one codebase.

Mindmap

mindmap
  root((korner))
    What it does
      Superellipse corners
      Adjustable smoothing
      Per-corner control
    Presets
      Subtle 25
      Balanced 50
      Smooth 75
      Continuous 100
    Platforms
      Android
      iOS
      Desktop
      Web WASM
    Tech Stack
      Kotlin
      Compose Multiplatform
      Maven Central
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Things people build with this

USE CASE 1

Add smooth squircle-style rounded corners to any Compose Multiplatform UI element with one line of Gradle dependency

USE CASE 2

Create iOS-style button and card shapes that work identically on Android, iOS, desktop, and web

USE CASE 3

Fine-tune corner smoothing independently for each of the four corners on a shape using numeric values from 0 to 100

Tech stack

KotlinCompose MultiplatformGradle

Getting it running

Difficulty · easy Time to first run · 30min
Use freely for any purpose including commercial use as long as you keep the copyright notice.

In plain English

Korner is a Kotlin library for Compose Multiplatform, the cross-platform UI toolkit from JetBrains. Its job is to give UI components smoother, more visually refined rounded corners than the standard approach provides. Ordinary rounded rectangles in most UI frameworks use circular arcs to cut the corners. The result is a corner where the curve starts and stops abruptly, which can look mechanical at larger radius values. Korner instead uses a superellipse curve, sometimes called a squircle, which transitions into and out of the straight edge more gradually. This style was popularized by Apple's iOS design and is now common in many modern interfaces. The library lets developers control both the radius (how much the corner is cut) and the smoothing level (how gradual the transition is) independently for each of the four corners on any shape. The smoothing value runs from 0 to 100. The library ships four named presets: Subtle at 25, Balanced at 50, Smooth at 75, and Continuous at 100. Continuous produces the most iOS-like result. Custom numeric values within the range are also accepted. The library works across Android, iOS, desktop, and web (WASM) targets from a single codebase, which is the purpose of Compose Multiplatform. It is available through Maven Central and installed with one line in a Gradle dependencies block. The project is adapted from an earlier Android-only implementation by a developer named racra and is licensed under MIT.

Copy-paste prompts

Prompt 1
How do I add korner to my Compose Multiplatform project via Gradle and apply the Continuous preset to a Card composable?
Prompt 2
Show me how to set different smoothing levels on individual corners of a Box using korner in Compose Multiplatform.
Prompt 3
Write a Compose Multiplatform composable with korner that mimics the iOS app icon squircle shape with a custom smoothing value.
Prompt 4
What is the visual difference between the Subtle, Balanced, Smooth, and Continuous presets in korner and when should I pick each one?
Open on GitHub → Explain another repo

← dev778g-me on gitmyhub — every repo by this author, as a profile.

Verify against the repo before relying on details.