{"id":34857118,"url":"https://github.com/stoyan-vuchev/squircle-shape","last_synced_at":"2026-02-17T23:16:05.591Z","repository":{"id":169034428,"uuid":"644665173","full_name":"stoyan-vuchev/squircle-shape","owner":"stoyan-vuchev","description":"A Compose Multiplatform library providing customizable Squircle shapes for UI components.","archived":false,"fork":false,"pushed_at":"2026-01-31T21:07:16.000Z","size":5849,"stargazers_count":81,"open_issues_count":0,"forks_count":6,"subscribers_count":4,"default_branch":"master","last_synced_at":"2026-02-12T18:27:18.329Z","etag":null,"topics":["android-library","compose-multiplatform","compose-multiplatform-android","compose-multiplatform-desktop","compose-multiplatform-ios","compose-multiplatform-library","compose-multiplatform-web","jetpack-compose","shape","shapes","squircle"],"latest_commit_sha":null,"homepage":"","language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/stoyan-vuchev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":"NOTICE","maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2023-05-24T02:12:10.000Z","updated_at":"2026-02-02T11:56:42.000Z","dependencies_parsed_at":"2025-08-10T23:21:25.218Z","dependency_job_id":"bcae31c3-b504-4a84-b307-884d0543e279","html_url":"https://github.com/stoyan-vuchev/squircle-shape","commit_stats":null,"previous_names":["stoyan-vuchev/squircle-shape"],"tags_count":16,"template":false,"template_full_name":null,"purl":"pkg:github/stoyan-vuchev/squircle-shape","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stoyan-vuchev%2Fsquircle-shape","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stoyan-vuchev%2Fsquircle-shape/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stoyan-vuchev%2Fsquircle-shape/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stoyan-vuchev%2Fsquircle-shape/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/stoyan-vuchev","download_url":"https://codeload.github.com/stoyan-vuchev/squircle-shape/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stoyan-vuchev%2Fsquircle-shape/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29561843,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-17T21:50:49.831Z","status":"ssl_error","status_checked_at":"2026-02-17T21:46:15.313Z","response_time":100,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["android-library","compose-multiplatform","compose-multiplatform-android","compose-multiplatform-desktop","compose-multiplatform-ios","compose-multiplatform-library","compose-multiplatform-web","jetpack-compose","shape","shapes","squircle"],"created_at":"2025-12-25T20:07:35.928Z","updated_at":"2026-02-17T23:16:05.584Z","avatar_url":"https://github.com/stoyan-vuchev.png","language":"Kotlin","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Squircle Shape\n\n![Maven Central Version](https://img.shields.io/maven-central/v/com.stoyanvuchev/squircle-shape)\n[![API](https://img.shields.io/badge/API-23%2B-brightgreen.svg?style=flat)](https://android-arsenal.com/api?level=23)\n[![Last Commit](https://img.shields.io/github/last-commit/stoyan-vuchev/squircle-shape/stable.svg?style=flat\u0026logo=github\u0026logoColor=white)](https://github.com/stoyan-vuchev/squircle-shape/commits/stable)\n[![Issues](https://img.shields.io/github/issues-raw/stoyan-vuchev/squircle-shape.svg?style=flat\u0026logo=github\u0026logoColor=white)](https://github.com/stoyan-vuchev/squircle-shape/issues)\n[![As Seen In](https://img.shields.io/badge/As_Seen_In-jetc.dev_Newsletter_Issue_%23168-blue?logo=Jetpack+Compose\u0026logoColor=white)](https://jetc.dev/issues/168.html)\n\n\u003e A Compose Multiplatform library providing customizable **Squircle** shapes for modern UI components.\n\n---\n\n## 🌿 Release Channels\n\nThis project maintains two long-lived branches:\n\n### 🟢 [`stable`](https://github.com/stoyan-vuchev/squircle-shape/tree/stable)\n- Built with the latest **stable** Compose Multiplatform / Jetpack Compose versions.\n- Recommended for **production apps**.\n- Published versions follow semantic versioning (e.g. `5.1.1`).\n\n### 🧪 [`experimental`](https://github.com/stoyan-vuchev/squircle-shape/tree/experimental)\n- Built with **alpha / beta / RC** Compose versions.\n- May introduce breaking changes earlier.\n- Intended for early adopters and testing upcoming Compose updates.\n\nIf you're building a production app, use the latest stable release from Maven Central.\n\n---\n\n## ✨ Features\n\n- **Customizable Squircle Shapes** — Smooth transition between squares and circles.\n- **MaterialTheme Integration** — Use directly inside `MaterialTheme.shapes`.\n- **Corner Smoothing Control** — Fine-tune curvature for precise design language.\n- **Compose Multiplatform Support** — Android, iOS, Desktop (JVM), Web (WasmJS).\n- **Canvas Support** — Draw squircles using `drawSquircle()`.\n\n---\n\n## ⚠️ Important Notice\n\n### Namespace Change\n\nThe library is now published under the `com.stoyanvuchev` namespace.\n\nIf upgrading from older versions, replace: `io.github.stoyan-vuchev` with `com.stoyanvuchev`\n\nCheck out the updated Setup guide [here](#-setup)\n\n---\n\n## 🆕 What's New\n\nSee full release history here:  \nhttps://github.com/stoyan-vuchev/squircle-shape/releases\n\n---\n\n## 📋 Minimum Requirements\n\n### 🟢 Stable Branch\n\n#### Multiplatform:\n- AGP: `9.0.0+`\n- Kotlin: `2.3.0+`\n- Compose Multiplatform: `1.10.1+`\n\n#### Android-only:\n- AGP: `9.0.0+`\n- Kotlin: `2.3.0+`\n- Jetpack Compose: `1.10.3+`\n- Minimum SDK: `23`\n- Compile SDK: `36`\n\n### 🧪 Experimental Branch\n\n#### Multiplatform:\n- AGP: `9.0.0+`\n- Kotlin: `2.3.0+`\n- Compose Multiplatform: `1.11.0-alpha02+`\n\n#### Android-only:\n- AGP: `9.0.0+`\n- Kotlin: `2.3.0+`\n- Jetpack Compose: `1.11.0-alpha04+`\n- Minimum SDK: `23`\n- Compile SDK: `36`\n\n---\n\n---\n\n## 📦 Setup\n\n### Gradle Kotlin DSL (Multiplatform)\n\n1. Add the dependency in your shared module's `build.gradle.kts`:\n* Latest version: ![Maven Central Version](https://img.shields.io/maven-central/v/com.stoyanvuchev/squircle-shape)\n\n```kotlin\nsourceSets {\n    \n    val commonMain by getting {\n        \n        dependencies {\n            \n            // ...\n            \n            implementation(\"com.stoyanvuchev:squircle-shape:5.1.1\")\n          \n        }\n      \n    }\n\n    // ...\n  \n}\n```\n\n* Or if you're using a version catalog (e.g. `libs.versions.toml`), declare it in the catalog instead.\n\n```toml\n[versions]\nsquircle-shape = \"5.1.1\"\n\n[libraries]\nsquircle-shape = { group = \"com.stoyanvuchev\", name = \"squircle-shape\", version.ref = \"squircle-shape\" }\n```\n\n* Then include the dependency in your shared module `build.gradle.kts` file.\n\n```kotlin\nsourceSets {\n\n  val commonMain by getting {\n\n    dependencies {\n\n      // ...\n\n      implementation(libs.squircle.shape)\n\n    }\n\n  }\n\n  // ...\n\n}\n```\n\n2. Sync and rebuild the project. 🔄️🔨✅\n\n---\n\n## Gradle Kotlin DSL Setup (For Android-only projects).\n\n1. Add the Squircle Shape dependency in your module `build.gradle.kts` file.\n* Latest version: ![Maven Central Version](https://img.shields.io/maven-central/v/com.stoyanvuchev/squircle-shape)\n\n```kotlin\ndependencies {\n            \n    // ...\n\n    implementation(\"com.stoyanvuchev:squircle-shape-android:5.1.1\")\n  \n}\n```\n\n* Or if you're using a version catalog (e.g. `libs.versions.toml`), declare it in the catalog instead.\n\n```toml\n[versions]\nsquircle-shape = \"5.1.1\"\n\n[libraries]\nsquircle-shape = { group = \"com.stoyanvuchev\", name = \"squircle-shape-android\", version.ref = \"squircle-shape\" }\n```\n\n* Then include the dependency in your module `build.gradle.kts` file.\n\n```kotlin\ndependencies {\n\n  // ...\n\n  implementation(libs.squircle.shape)\n\n}\n```\n\n2. Sync and rebuild the project. 🔄️🔨✅\n\n---\n\n## 🚀 Usage\n\n### 1. **Using Squircle Shapes with `MaterialTheme`**\n\nDefine squircle shapes in your theme to use them consistently across your app:\n\n```kotlin\nval shapes = Shapes(\n    small = SquircleShape(radius = 16.dp, cornerSmoothing = CornerSmoothing.Medium),\n    medium = SquircleShape(radius = 32.dp, cornerSmoothing = CornerSmoothing.Medium),\n    large = SquircleShape(percent = 100, cornerSmoothing = CornerSmoothing.Medium)\n)\n\nMaterialTheme(\n    shapes = shapes\n) {\n\n    // ...\n\n    Button(\n        onClick = { /* Action */ },\n        shape = MaterialTheme.shapes.large // Clipped to the provided `large` material theme shape.\n    ) {\n        Text(text = \"Full Squircle\")\n    }\n\n    // ...\n\n}\n```\n\n![Button with Full Squircle shape.](./readme_images/full_squircle.png)\n\n### 2. **Using Squircle Shapes separately**\n\nClip UI components separately by using a `SquircleShape()` function.\n\n```kotlin\nImage(\n    modifier = Modifier\n        .size(128.dp)\n        .clip(\n            shape = SquircleShape(\n                percent = 100,\n                cornerSmoothing = CornerSmoothing.Medium\n            )\n        ), // Clipped to a fully rounded squircle shape.\n    painter = painterResource(R.drawable.mlbb_novaria),\n    contentDescription = \"An image of Novaria.\",\n    contentScale = ContentScale.Crop\n)\n```\n\n![A portrait image of Novaria from MLBB clipped to a Squircle shape.](./readme_images/mlbb_novaria.png)\n\nYou can customize the radii for all corners, or for each corner independently.\nSupported corner values are:\n\n- `Int` for percent-based corner radius in range 0..100 \n- `Float` for pixel-based corner radius e.g. `50f`\n- `Dp` for density pixel-based corner radius e.g. `16.dp`\n\n```kotlin\n// Single-corner percent-based radius implementation.\nSquircleShape(\n    percent = 100,\n    cornerSmoothing = .6f\n)\n\n// Single-corner pixel-based radius implementation.\nSquircleShape(\n    radius = 32f,\n    cornerSmoothing = .6f\n)\n\n// Single-corner density pixel-based radius implementation.\nSquircleShape(\n    radius = 32.dp,\n    cornerSmoothing = .6f\n)\n\n// Multi-corner percent-based radius implementation.\nSquircleShape(\n    topStart = 25,\n    topEnd = 5,\n    bottomStart = 25,\n    bottomEnd = 5,\n    cornerSmoothing = .6f\n)\n\n// Multi-corner pixel-based radius implementation.\nSquircleShape(\n    topStart = 32f,\n    topEnd = 8f,\n    bottomStart = 32f,\n    bottomEnd = 8f,\n    cornerSmoothing = .6f\n)\n\n// Multi-corner density pixel-based radius implementation.\nSquircleShape(\n    topStart = 32.dp,\n    topEnd = 8.dp,\n    bottomStart = 32.dp,\n    bottomEnd = 8.dp,\n    cornerSmoothing = .6f\n)\n```\n\n### 3. Draw a Squircle on Canvas\n\nYou can draw squircle shapes on a canvas for custom graphics.\n\nNote: currently `drawSquircle` only accepts pixel-based values for each corner:\n\n```kotlin\nCanvas(\n    modifier = Modifier.size(150.dp),\n    onDraw = {\n    \n        drawSquircle(\n            color = Color.Blue,\n            topLeft = Offset.Zero,\n            size = this.size,\n            topLeftCorner = 32.dp.toPx(),\n            topRightCorner = 8.dp.toPx(),\n            bottomRightCorner = 32.dp.toPx(),\n            bottomLeftCorner = 8.dp.toPx(),\n            cornerSmoothing = .6f\n        )\n    \n    }\n)\n```\n\n---\n\n## 📄 License\n```\nMIT License\n\nCopyright (c) 2023-2026 Stoyan Vuchev\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights to\nuse, copy, modify, merge, publish, distribute, sublicense, and/or sell copies\nof the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n```\n\n---\n\n## 👤 Contact\n\nCreated by [@stoyan-vuchev](https://github.com/stoyan-vuchev/) – feel free to reach out!\n\n📧 Email: [contact@stoyanvuchev.com](mailto:://contact@stoyanvuchev.com)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstoyan-vuchev%2Fsquircle-shape","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstoyan-vuchev%2Fsquircle-shape","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstoyan-vuchev%2Fsquircle-shape/lists"}