{"id":46901958,"url":"https://github.com/marioprieta/react-native-theme-transition","last_synced_at":"2026-04-22T17:02:42.839Z","repository":{"id":343311670,"uuid":"1173935267","full_name":"marioprieta/react-native-theme-transition","owner":"marioprieta","description":"Smooth, animated theme transitions for React Native. Expo Go compatible, powered by Reanimated.","archived":false,"fork":false,"pushed_at":"2026-03-10T22:50:11.000Z","size":64569,"stargazers_count":6,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-03-11T03:52:02.297Z","etag":null,"topics":["animation","dark-mode","expo","expo-go","react","react-native","reanimated","theme-manager","theming","typescript"],"latest_commit_sha":null,"homepage":"https://react-native-theme-transition.vercel.app","language":"TypeScript","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/marioprieta.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","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}},"created_at":"2026-03-05T22:43:34.000Z","updated_at":"2026-03-11T00:19:29.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/marioprieta/react-native-theme-transition","commit_stats":null,"previous_names":["marioprieta/react-native-theme-transition"],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/marioprieta/react-native-theme-transition","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marioprieta%2Freact-native-theme-transition","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marioprieta%2Freact-native-theme-transition/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marioprieta%2Freact-native-theme-transition/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marioprieta%2Freact-native-theme-transition/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/marioprieta","download_url":"https://codeload.github.com/marioprieta/react-native-theme-transition/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marioprieta%2Freact-native-theme-transition/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30410355,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-12T00:40:14.898Z","status":"ssl_error","status_checked_at":"2026-03-12T00:40:08.439Z","response_time":84,"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":["animation","dark-mode","expo","expo-go","react","react-native","reanimated","theme-manager","theming","typescript"],"created_at":"2026-03-11T00:10:43.958Z","updated_at":"2026-03-12T01:00:45.919Z","avatar_url":"https://github.com/marioprieta.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003eReact Native Theme Transition\u003c/h1\u003e\n\n\u003cp align=\"center\"\u003e\n  Smooth, animated theme transitions for React Native. Expo Go compatible, powered by Reanimated.\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://www.npmjs.com/package/react-native-theme-transition\"\u003e\u003cimg src=\"https://img.shields.io/npm/v/react-native-theme-transition.svg?t=1\" alt=\"npm version\" /\u003e\u003c/a\u003e\n  \u003ca href=\"https://bundlephobia.com/package/react-native-theme-transition\"\u003e\u003cimg src=\"https://img.shields.io/badge/gzip%20size-2.7%20kB-brightgreen\" alt=\"bundle size\" /\u003e\u003c/a\u003e\n  \u003cimg src=\"https://img.shields.io/badge/Expo_Go-compatible-000.svg?logo=expo\u0026logoColor=white\" alt=\"expo compatible\" /\u003e\n  \u003cimg src=\"https://img.shields.io/badge/React_Compiler-compatible-blueviolet.svg\" alt=\"react compiler\" /\u003e\n  \u003ca href=\"https://github.com/marioprieta/react-native-theme-transition/blob/main/LICENSE\"\u003e\u003cimg src=\"https://img.shields.io/npm/l/react-native-theme-transition?t=1\" alt=\"license\" /\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n\u003ctable align=\"center\"\u003e\n  \u003ctr\u003e\n    \u003ctd align=\"center\"\u003e\u003cb\u003eiOS\u003c/b\u003e\u003c/td\u003e\n    \u003ctd align=\"center\"\u003e\u003cb\u003eAndroid\u003c/b\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003e\n      \u003cimg src=\"https://raw.githubusercontent.com/marioprieta/react-native-theme-transition/main/assets/videos/iOS_demo.gif\" width=\"260\" alt=\"iOS theme transition demo\" /\u003e\n    \u003c/td\u003e\n    \u003ctd\u003e\n      \u003cimg src=\"https://raw.githubusercontent.com/marioprieta/react-native-theme-transition/main/assets/videos/Android_demo.gif\" width=\"260\" alt=\"Android theme transition demo\" /\u003e\n    \u003c/td\u003e\n  \u003c/tr\u003e\n\u003c/table\u003e\n\n## Features\n\n- **Smooth cross-fade transitions** — powered by Reanimated on the native UI thread (60-120 FPS)\n- **Expo Go compatible** — no native code, no prebuilds required\n- **Multi-theme support** — define as many themes as you need with full TypeScript inference\n- **System theme sync** — follows OS appearance automatically with zero-flash startup\n- **Native UI sync** — alerts, keyboards, and date pickers automatically match your active theme\n- **Transition safe** — blocks concurrent transitions and exposes `isTransitioning`\n- **React Compiler ready** — all hooks follow the [Rules of React](https://react.dev/reference/rules)\n- **Lightweight** — ~2.7 kB gzipped, zero runtime dependencies\n\n## Documentation\n\nFor full docs, API reference, examples, and recipes, visit **[react-native-theme-transition.vercel.app](https://react-native-theme-transition.vercel.app)**.\n\n## Installation\n\n```bash\n# Expo (SDK 54+ already has reanimated and view-shot)\nnpx expo install react-native-theme-transition react-native-worklets\n\n# React Native CLI\nnpm install react-native-theme-transition react-native-reanimated react-native-view-shot react-native-worklets\n```\n\nAdd `react-native-worklets/plugin` as the **last plugin** in your `babel.config.js`.\n\n## Quick start\n\n```ts\n// theme.ts\nimport { createThemeTransition } from 'react-native-theme-transition';\n\nexport const { ThemeTransitionProvider, useTheme } = createThemeTransition({\n  themes: {\n    light: { background: '#ffffff', text: '#000000', primary: '#007AFF' },\n    dark:  { background: '#000000', text: '#ffffff', primary: '#0A84FF' },\n  },\n});\n```\n\n```tsx\n// App.tsx\nimport { ThemeTransitionProvider } from './theme';\n\nexport default function App() {\n  return (\n    \u003cThemeTransitionProvider initialTheme=\"system\"\u003e\n      \u003cMyApp /\u003e\n    \u003c/ThemeTransitionProvider\u003e\n  );\n}\n```\n\n```tsx\n// MyScreen.tsx\nimport { useTheme } from './theme';\n\nfunction MyScreen() {\n  const { colors, name, setTheme, isTransitioning } = useTheme();\n\n  return (\n    \u003cView style={{ flex: 1, backgroundColor: colors.background }}\u003e\n      \u003cText style={{ color: colors.text }}\u003eCurrent: {name}\u003c/Text\u003e\n      \u003cPressable\n        onPress={() =\u003e setTheme(name === 'light' ? 'dark' : 'light')}\n        disabled={isTransitioning}\n      \u003e\n        \u003cText style={{ color: colors.primary }}\u003eToggle theme\u003c/Text\u003e\n      \u003c/Pressable\u003e\n    \u003c/View\u003e\n  );\n}\n```\n\n## Contributing\n\nContributions are welcome! Please read the [contributing guide](./CONTRIBUTING.md) and open an issue first to discuss what you'd like to change.\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarioprieta%2Freact-native-theme-transition","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmarioprieta%2Freact-native-theme-transition","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarioprieta%2Freact-native-theme-transition/lists"}