{"id":16426796,"url":"https://github.com/lcdsmao/jettheme","last_synced_at":"2025-07-06T15:06:40.775Z","repository":{"id":47150474,"uuid":"310803883","full_name":"lcdsmao/JetTheme","owner":"lcdsmao","description":"A flexible theme provider for Jetpack Compose. Supports dynamic theme changes and saving theme preference.","archived":false,"fork":false,"pushed_at":"2025-02-25T00:37:38.000Z","size":843,"stargazers_count":54,"open_issues_count":3,"forks_count":3,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-08T00:39:58.294Z","etag":null,"topics":["android","jetpack-compose","kotlin","kotlin-android","material-design","theme","theme-values"],"latest_commit_sha":null,"homepage":"https://lcdsmao.github.io/JetTheme/","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/lcdsmao.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","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}},"created_at":"2020-11-07T08:51:50.000Z","updated_at":"2025-03-04T01:53:44.000Z","dependencies_parsed_at":"2023-12-26T01:33:01.677Z","dependency_job_id":"0eb8c4c5-881a-4798-879d-a3b60b0ab475","html_url":"https://github.com/lcdsmao/JetTheme","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":"lcdsmao/kotlin-android-library-template","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lcdsmao%2FJetTheme","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lcdsmao%2FJetTheme/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lcdsmao%2FJetTheme/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lcdsmao%2FJetTheme/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lcdsmao","download_url":"https://codeload.github.com/lcdsmao/JetTheme/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252978668,"owners_count":21834910,"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","jetpack-compose","kotlin","kotlin-android","material-design","theme","theme-values"],"created_at":"2024-10-11T08:10:26.694Z","updated_at":"2025-05-08T00:40:06.397Z","avatar_url":"https://github.com/lcdsmao.png","language":"Kotlin","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp\u003e\n  \u003ca href=\"https://github.com/lcdsmao/JetTheme\"\u003e\n    \u003cimg src=\"https://raw.githubusercontent.com/lcdsmao/JetTheme/main/art/logo.svg\" width=\"128px\"\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n# JetTheme\n\n\u003cp\u003e\n  \u003ca href=\"https://github.com/lcdsmao/JetTheme/actions\"\u003e\n    \u003cimg src=\"https://github.com/lcdsmao/JetTheme/workflows/CI/badge.svg\"/\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://search.maven.org/artifact/dev.lcdsmao.jettheme/jettheme/\"\u003e\n    \u003cimg src=\"https://img.shields.io/maven-central/v/dev.lcdsmao.jettheme/jettheme\"/\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\nJetTheme is a flexible theme provider for Jetpack Compose.\n\n- Change the theme and recompose the UI dynamically.\n- Save theme preference to local storage.\n- Build your own design system.\n\n## Download\n\n```gradle\ndependencies {\n  // Use this if you want material design support (recommended)\n  implementation \"dev.lcdsmao.jettheme:jettheme-material:$latestVersion\"\n  // Use this if you want to build custom design system\n  implementation \"dev.lcdsmao.jettheme:jettheme:$latestVersion\"\n}\n```\n\n## Quick Start\n\n### Provide Themes\n\nDefine your material themes themes using `buildMaterialThemePack`.\n\n```kotlin\nval AppTheme = buildMaterialThemePack {\n  defaultMaterialTheme(\n    colors = lightColors(...),\n    typography = Typography(...),\n    shapes = Shapes(...),\n  )\n  materialTheme(\n    id = darkId,\n    colors = darkColors(...),\n  )\n  materialTheme(\n    id = \"other_theme\",\n    colors = otherColors(...),\n  )\n}\n```\n\nFor child components can correctly access defined `AppTheme` via `MaterialTheme`,\nwrap your child components in a `ProvideAppMaterialTheme`.\n\n```kotlin\n@Composable\nfun App() {\n  ProvideAppMaterialTheme(AppTheme) {\n    // children\n  }\n}\n```\n\n### Change Themes\n\nYou can retrieve current component tree's `ThemeController` from `ThemeControllerAmbient`.\n\n```kotlin\nval themeController = ThemeControllerAmbient.current\n```\n\nTo change current theme you can use the theme id strings.\n\n```kotlin\nthemeController.setThemeId(ThemeIds.Default)\nthemeController.setThemeId(\"other_theme_id\")\n```\n\n### Access Current Theme Values\n\nYou can access current theme values via `MaterialTheme` object (from `androidx.compose.material`):\n\n```kotlin\nSurface(color = MaterialTheme.colors.primary) {\n  // children\n}\n```\n\nCheck out JetTheme's [full documentation here.](https://lcdsmao.github.io/jettheme/)\n\n## Contributing\n\nFeel free to open a issue or submit a pull request for any bugs/improvements.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flcdsmao%2Fjettheme","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flcdsmao%2Fjettheme","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flcdsmao%2Fjettheme/lists"}