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-clip-view

v0.1.0

Published

Experimental drawing-only rounded rectangle clipping for React Native

Downloads

181

Readme

react-native-clip-view

Experimental Fabric component for React Native 0.85+. The API may change between experimental releases.

Purpose and scope

Built for react-native-screen-transitions, this package exposes animatable clipping props on a native view. The goal is to improve Android transition performance by changing the visible clipping region without resizing the content on every frame. Actual performance depends on the workload and device.

Clip View is not a general replacement for MaskedView. It supports rectangular and rounded-rectangle clipping, not arbitrary alpha masks such as text, images, or gradients. It was built to help screen transitions animate zoom and boundary reveals on Android without resizing content or rendering a separate mask.

You can use it independently, but the API is intentionally small. There are no plans to turn it into a general-purpose masking or graphics library. If you have a concrete use case that would benefit from extending the API, open an issue and share it.

Android comparison

Two separate 10-second recordings on the same Pixel 4a Android emulator, with 100 overlapping copies and identical animation settings. MaskedView animates a regular View mask in software rendering mode; Native Clip View clips the content directly without MaskedView.

| MaskedView | Native Clip View | | --- | --- | | MaskedView animated preview | Native Clip View animated preview | | Watch MaskedView | Watch Native Clip View |

The inline previews are reduced to 15 FPS; the linked videos are 30 FPS. These are debug-build demonstrations, not a device benchmark. The on-screen meter estimates UI callback timing rather than GPU-presented frames. Neither video contains mode switching.

Installation

npm install react-native-clip-view@experimental

Rebuild your native app after installation. For bare iOS apps, install CocoaPods dependencies before building. Expo apps require a development build.

Usage

A Fabric view that clips a fixed-layout subtree to an animated rounded rectangle. It does not change its Yoga width/height. It can be used independently of navigation libraries.

import { ClipView } from 'react-native-clip-view';
import Animated, { useAnimatedProps } from 'react-native-reanimated';

const AnimatedClipView = Animated.createAnimatedComponent(ClipView);
// In a component:
const props = useAnimatedProps(() => ({
  clipWidth: width.value,
  clipHeight: height.value,
  clipRadius: 24,
}));
// Keep the host and content layout dimensions fixed.
<AnimatedClipView style={{ width: 280, height: 280 }} animatedProps={props}>
  {children}
</AnimatedClipView>;

Validation status

The comparison shown above was recorded on a Pixel 4a Android emulator, not a physical device. The example was also built and exercised on an iPhone 17 Pro simulator. Build, type checking, and React Native Codegen checks have passed.

The initial results look promising, but further testing is needed before recommending this for a smooth experience in react-native-screen-transitions. In particular, real transition integration, gestures, corner behavior, and performance on physical devices still need validation. The synthetic comparison does not establish a general performance improvement or production readiness.

Development

The library scaffold was generated with Create React Native Library. Builder Bob builds its JavaScript and type declarations. See CONTRIBUTING.md for build commands and the Expo example.