Big News: Socket raises $60M Series C at a $1B valuation to secure software supply chains for AI-driven development.Announcement
Sign In

react-native-pixel-launch

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-native-pixel-launch

Pixel Launcher-style scale-from-origin overlay animation for React Native

Source
npmnpm
Version
1.0.0
Version published
Weekly downloads
375
Maintainers
1
Weekly downloads
 
Created
Source

react-native-pixel-launch

Pixel Launcher-style scale-from-origin overlay animation for React Native and Expo.

Opens a full-screen overlay that scales up from any element on screen (like Android's Pixel Launcher app-open animation), and collapses back on close.

Features

  • Scales from any screen element to full screen
  • Circular reveal on open, collapses back on close
  • Runs on the native thread (useNativeDriver: true) for smooth 60/120 Hz performance
  • Works with both Expo and bare React Native
  • TypeScript support built-in
  • Zero dependencies (only react and react-native)

Installation

npm install react-native-pixel-launch
# or
yarn add react-native-pixel-launch

Usage

import { useState, useRef } from "react";
import { View, TouchableOpacity, Text } from "react-native";
import {
  PixelLaunchContainer,
  type LaunchOrigin,
} from "react-native-pixel-launch";

export default function App() {
  const [visible, setVisible] = useState(false);
  const [origin, setOrigin]   = useState<LaunchOrigin | null>(null);
  const btnRef                = useRef<View>(null);

  const handleOpen = () => {
    btnRef.current?.measure((_x, _y, width, height, pageX, pageY) => {
      setOrigin({ x: pageX, y: pageY, width, height });
      setVisible(true);
    });
  };

  return (
    <View style={{ flex: 1 }}>
      <TouchableOpacity ref={btnRef} onPress={handleOpen}>
        <Text>Open</Text>
      </TouchableOpacity>

      <PixelLaunchContainer
        visible={visible}
        origin={origin}
        onClose={() => setVisible(false)}
        onDismissed={() => console.log("fully closed")}
        backgroundColor="#FFFFFF"
      >
        <View style={{ flex: 1, alignItems: "center", justifyContent: "center" }}>
          <Text>Your screen content here</Text>
          <TouchableOpacity onPress={() => setVisible(false)}>
            <Text>Close</Text>
          </TouchableOpacity>
        </View>
      </PixelLaunchContainer>
    </View>
  );
}

Props

PropTypeRequiredDefaultDescription
visiblebooleanYesControls open/close state
originLaunchOrigin | nullYesScreen-absolute rect of the trigger element
onClose() => voidYesCalled when user wants to close
onDismissed() => voidNoCalled after close animation completes
backgroundColorstringNo"#FFFFFF"Overlay background colour
childrenReactNodeYesContent rendered inside the overlay

LaunchOrigin type

type LaunchOrigin = {
  x: number;      // pageX from ref.measure()
  y: number;      // pageY from ref.measure()
  width: number;
  height: number;
};

Get these values using ref.measure() on the trigger element — see the usage example above.

License

MIT — made by Sourabh Patidar

react-native-pixel-launch-

sourabh0904-react-native-pixel-launch

sourabh0904-react-native-pixel-launch

sourabh0904-react-native-pixel-launch

react-native-pixel-launch

Keywords

react-native

FAQs

Package last updated on 06 Jun 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts