{"id":13658308,"url":"https://github.com/joelkanyi/sain","last_synced_at":"2026-04-26T18:02:19.794Z","repository":{"id":107321474,"uuid":"594658991","full_name":"joelkanyi/sain","owner":"joelkanyi","description":"[サイン] A Compose Multiplatform library for capturing and exporting signatures as ImageBitmap with customizable options. Perfect for electronic signature, legal documents and more.","archived":false,"fork":false,"pushed_at":"2026-04-25T12:48:26.000Z","size":32208,"stargazers_count":230,"open_issues_count":10,"forks_count":10,"subscribers_count":4,"default_branch":"main","last_synced_at":"2026-04-25T14:25:52.149Z","etag":null,"topics":["compose-multiplatform","digital-signature","documents","e-sign","e-signature","electronic-signature","jetpack-compose","kotlin","signature","signature-pad"],"latest_commit_sha":null,"homepage":"https://joelkanyi.github.io/sain/","language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/joelkanyi.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","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":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"github":"joelkanyi","ko_fi":"joelkanyi","buy_me_a_coffee":"joelkanyi"}},"created_at":"2023-01-29T08:27:15.000Z","updated_at":"2026-03-18T12:29:45.000Z","dependencies_parsed_at":"2026-03-26T15:03:11.420Z","dependency_job_id":null,"html_url":"https://github.com/joelkanyi/sain","commit_stats":null,"previous_names":["joelkanyi/sain"],"tags_count":19,"template":false,"template_full_name":null,"purl":"pkg:github/joelkanyi/sain","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joelkanyi%2Fsain","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joelkanyi%2Fsain/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joelkanyi%2Fsain/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joelkanyi%2Fsain/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/joelkanyi","download_url":"https://codeload.github.com/joelkanyi/sain/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joelkanyi%2Fsain/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32307016,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-26T17:23:19.671Z","status":"ssl_error","status_checked_at":"2026-04-26T17:23:19.195Z","response_time":129,"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":["compose-multiplatform","digital-signature","documents","e-sign","e-signature","electronic-signature","jetpack-compose","kotlin","signature","signature-pad"],"created_at":"2024-08-02T05:00:58.523Z","updated_at":"2026-04-26T18:02:19.788Z","avatar_url":"https://github.com/joelkanyi.png","language":"Kotlin","funding_links":["https://github.com/sponsors/joelkanyi","https://ko-fi.com/joelkanyi","https://buymeacoffee.com/joelkanyi"],"categories":["Multiplatform"],"sub_categories":["Android samples"],"readme":"[![Maven Central](https://img.shields.io/maven-central/v/io.github.joelkanyi/sain.svg)](https://search.maven.org/artifact/io.github.joelkanyi/sain)\n![Build](https://github.com/joelkanyi/sain/actions/workflows/build.yml/badge.svg)\n![Kotlin](https://img.shields.io/badge/Kotlin-Multiplatform-7F52FF?logo=kotlin\u0026logoColor=white)\n![Compose Multiplatform](https://img.shields.io/badge/Compose-Multiplatform-4285F4?logo=jetpackcompose\u0026logoColor=white)\n[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)\n\n# Sain (サイン)\n\nA Compose Multiplatform library for capturing and exporting signatures as `ImageBitmap` with customizable options. Perfect for electronic signatures, legal documents, and more.\n\n**Supported platforms:** Android · iOS · Desktop (JVM) · Web (JS) · Web (WasmJS)\n\nSee the [project's website](https://joelkanyi.github.io/sain/) for full documentation.\n\n## Features\n\n- Capture signatures as `ImageBitmap` on all platforms\n- Customizable signature color, thickness, pad color, shape, and border\n- Optional guideline with configurable style, padding, and dash pattern\n- Hint text when the signature pad is empty\n- State management with `rememberSignatureState()` for persistence\n- Clear and complete actions via `SignatureAction`\n\n## Installation\n\nAdd the Maven Central repository if it is not already there:\n\n```kotlin\nrepositories {\n    mavenCentral()\n}\n```\n\n### Multiplatform Projects\n\nAdd the dependency to your `commonMain` source set:\n\n```kotlin\nkotlin {\n    sourceSets {\n        commonMain {\n            dependencies {\n                implementation(\"io.github.joelkanyi:sain:\u003clatest-version\u003e\")\n            }\n        }\n    }\n}\n```\n\n### Android Projects\n\nAdd the dependency to your app's `build.gradle.kts`:\n\n```kotlin\ndependencies {\n    implementation(\"io.github.joelkanyi:sain:\u003clatest-version\u003e\")\n}\n```\n\n### Gradle Version Catalog\n\nAdd the following to your `libs.versions.toml`:\n\n```toml\n[versions]\nsain = \"\u003clatest-version\u003e\"\n\n[libraries]\nsain = { module = \"io.github.joelkanyi:sain\", version.ref = \"sain\" }\n```\n\nThen add the dependency in your `build.gradle.kts`:\n\n```kotlin\ndependencies {\n    implementation(libs.sain)\n}\n```\n\n## Quick Start\n\nAdd the `Sain` composable to your project:\n\n```kotlin\nvar imageBitmap by remember { mutableStateOf\u003cImageBitmap?\u003e(null) }\n\nSain(\n    signatureHeight = 250.dp,\n    signaturePadColor = Color.White,\n    signatureBorderStroke = BorderStroke(\n        width = .5.dp,\n        color = MaterialTheme.colorScheme.onSurface,\n    ),\n    signaturePadShape = RoundedCornerShape(8.dp),\n    onComplete = { signatureBitmap -\u003e\n        if (signatureBitmap != null) {\n            imageBitmap = signatureBitmap\n        } else {\n            println(\"Signature is empty\")\n        }\n    },\n) { action -\u003e\n    Row(\n        modifier = Modifier\n            .padding(top = 16.dp)\n            .fillMaxWidth(),\n        horizontalArrangement = Arrangement.spacedBy(16.dp),\n    ) {\n        Button(\n            modifier = Modifier.weight(1f),\n            onClick = {\n                imageBitmap = null\n                action(SignatureAction.CLEAR)\n            },\n        ) {\n            Text(\"Clear\")\n        }\n        Button(\n            modifier = Modifier.weight(1f),\n            onClick = {\n                action(SignatureAction.COMPLETE)\n            },\n        ) {\n            Text(\"Complete\")\n        }\n    }\n}\n```\n\n## Preview\n\n| Android | iOS | Desktop |\n|:-------:|:---:|:-------:|\n| \u003cimg src=\"demo/android_demo.gif\" width=\"220\"/\u003e | \u003cimg src=\"demo/ios_demo.gif\" width=\"220\"/\u003e | \u003cimg src=\"demo/desktop_demo.gif\" width=\"300\"/\u003e |\n\n| Web (JS) | Web (WasmJS) |\n|:--------:|:------------:|\n| \u003cimg src=\"demo/web_js_demo.gif\" width=\"300\"/\u003e | \u003cimg src=\"demo/demo_web_wasm.gif\" width=\"300\"/\u003e |\n\n## License\n\n```\nCopyright 2023 Joel Kanyi\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n   http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjoelkanyi%2Fsain","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjoelkanyi%2Fsain","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjoelkanyi%2Fsain/lists"}