npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

react-native-theme-transition

v2.0.1

Published

Animated theme transitions for React Native. Nine styles built on Skia, all running in Expo Go.

Readme

Features

  • Nine transition styles. fade, circularReveal, heart, star, wipe, slide, split, pixelize, dissolve.
  • Expo Go ready. Works on Expo SDK 55+ out of the box. Bare React Native CLI also supported.
  • Full TypeScript inference. useTheme() and setTheme() know your theme names and color tokens without manual generics.
  • System theme built in. Follows OS appearance with zero-flash startup.
  • Strict runtime validation. Invalid options throw immediately with clear error messages.
  • React Compiler compatible. All hooks follow the Rules of React.

Requirements

  • React 19.0.0+ and React Native 0.78.0+
  • @shopify/react-native-skia 2.0.0+
  • react-native-reanimated 4.0.0+
  • react-native-worklets 0.5.0+

Try it

  • Snack Live playground with the 9 transitions. Open it on iOS — Snack's Android preview runs slowly and the animations don't render (this is a Snack limitation, not a library one; animations run fine on real Android devices and in release builds).
  • Docs API reference, recipes, migration guide.

Installation

# Expo (SDK 55+)
npx expo install react-native-theme-transition @shopify/react-native-skia react-native-worklets

# React Native CLI
npm install react-native-theme-transition @shopify/react-native-skia react-native-reanimated react-native-worklets

Add react-native-worklets/plugin as the last plugin in your babel.config.js. On Expo SDK 55+, do NOT add react-native-reanimated/plugin, since babel-preset-expo already includes it.

Using Claude Code, Cursor, or Codex? Install the AI-assisted setup skill first and the agent can run the installation from the v2 API reference.

Quick Start

// theme.ts
import { createThemeTransition } from 'react-native-theme-transition'

export const { ThemeTransitionProvider, useTheme } = createThemeTransition({
  themes: {
    light: { background: '#ffffff', text: '#000000', primary: '#007AFF' },
    dark:  { background: '#000000', text: '#ffffff', primary: '#0A84FF' },
  },
})
// App.tsx
import { ThemeTransitionProvider } from './theme'

export default function App() {
  return (
    <ThemeTransitionProvider initialTheme="system">
      <MyApp />
    </ThemeTransitionProvider>
  )
}
// MyScreen.tsx
import { Pressable, Text, View } from 'react-native'
import { useTheme } from './theme'

function MyScreen() {
  const { theme, setTheme, isTransitioning } = useTheme()

  return (
    <View style={{ flex: 1, backgroundColor: theme.colors.background }}>
      <Text style={{ color: theme.colors.text }}>Current: {theme.name}</Text>
      <Pressable
        onPress={() => setTheme(theme.name === 'dark' ? 'light' : 'dark', { transition: 'circularReveal' })}
        disabled={isTransitioning}
      >
        <Text style={{ color: theme.colors.primary }}>Toggle</Text>
      </Pressable>
    </View>
  )
}

useTheme() returns theme, preference, setTheme, and isTransitioning. See the useTheme reference for the full API.

Want the agent to write all three files? With the AI-assisted setup skill installed, Claude Code or Cursor has these steps as a recipe and applies them to your project directly.

AI-assisted setup

For agentic coding with Claude Code, Cursor, or Codex, the library ships a skill:

npx skills add https://skills.sh/marioprieta/skills/react-native-theme-transition

It's the same content as the docs site, split into files so the agent can pull the relevant one (api, guides, recipes, examples) instead of loading everything.

Contributing

Contributions are welcome. Please read the contributing guide and open an issue first to discuss what you'd like to change.

License

MIT