{"id":29179750,"url":"https://github.com/trendyol/stately","last_synced_at":"2025-07-01T19:06:28.316Z","repository":{"id":187608884,"uuid":"676502674","full_name":"Trendyol/stately","owner":"Trendyol","description":"Stately is a library for managing different states of a content in Jetpack Compose.","archived":false,"fork":false,"pushed_at":"2025-02-03T11:23:37.000Z","size":842,"stargazers_count":16,"open_issues_count":3,"forks_count":0,"subscribers_count":37,"default_branch":"main","last_synced_at":"2025-03-22T05:33:02.270Z","etag":null,"topics":["android","compose-library","compose-ui","jetpack-compose"],"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/Trendyol.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}},"created_at":"2023-08-09T10:50:00.000Z","updated_at":"2023-08-17T12:19:48.000Z","dependencies_parsed_at":"2023-08-11T12:00:05.567Z","dependency_job_id":"a87234b7-5d67-42e7-8522-d3baf6219cdc","html_url":"https://github.com/Trendyol/stately","commit_stats":null,"previous_names":["trendyol/stately"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/Trendyol/stately","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Trendyol%2Fstately","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Trendyol%2Fstately/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Trendyol%2Fstately/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Trendyol%2Fstately/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Trendyol","download_url":"https://codeload.github.com/Trendyol/stately/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Trendyol%2Fstately/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263021821,"owners_count":23401148,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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","compose-library","compose-ui","jetpack-compose"],"created_at":"2025-07-01T19:06:24.531Z","updated_at":"2025-07-01T19:06:28.296Z","avatar_url":"https://github.com/Trendyol.png","language":"Kotlin","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Stately\n\nStately is a library for managing different states of a content in Jetpack Compose.\n\n| \u003cimg src=\"art/main.gif\" width=\"170\"/\u003e | \u003cimg src=\"art/loading.gif\" width=\"170\"/\u003e | \u003cimg src=\"art/loadingwithcontentcircle.gif\" width=\"170\"/\u003e | \u003cimg src=\"art/loadingwithcontentprogress.gif\" width=\"170\"/\u003e | \u003cimg title=\"\" src=\"art/infostate.png\" alt=\"\" width=\"170\"\u003e |\n| ------------------------------------- | ---------------------------------------- | --------------------------------------------------------- | ----------------------------------------------------------- | --------------------------------------------------------- |\n\n## Usage\n\nTo use the code, first create an `LayoutState` instance with using `rememberContentState`. Then, use the `content parameter of layout state` to customize state.\n\n```kotlin\nval contentState = rememberContentState()\n\nLaunchedEffect(Unit) {\n  contentState.content = /* new state */\n}\n```\n\nYou can fill contentLayout, infoLayout, loadingLayout as you like.\n\n```kotlin\nStately(\n    modifier = Modifier.fillMaxSize(),\n    layoutState = contentState,\n    infoLayout = { model -\u003e\n        InfoState(\n            modifier = Modifier.fillMaxSize(),\n            model = model,\n            retryButtonClicked = onRetryButtonClick\n        )\n    },\n    loadingLayout = {\n        LoadingState()\n    },\n    contentLayout = {\n        Column(\n            modifier = Modifier.fillMaxSize(),\n            verticalArrangement = Arrangement.Center,\n            horizontalAlignment = Alignment.CenterHorizontally\n        ) {\n            SampleContent(modifier = Modifier.padding(8.dp))\n        }\n    },\n)\n\n```\n\n## Including in your project\n\nAdd the JitPack repository to your project-level `build.gradle` file:\n\n```\nallprojects {\n    repositories {\n        ...\n        maven { url 'https://jitpack.io' }\n    }\n}\n```\n\nAdd the dependency to your app-level `build.gradle` file:\n\n```\ndependencies {\n    implementation 'com.github.trendyol:stately:1.0.0'\n}\n```\n\nSync your project with Gradle files.\n\n## License\n```\nMIT License\n\nCopyright (c) 2023 Trendyol\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\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies 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","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftrendyol%2Fstately","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftrendyol%2Fstately","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftrendyol%2Fstately/lists"}