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-resquircle

v1.0.1

Published

High-performance native squircle (superellipse) implementation for React Native on iOS and Android

Readme

react-native-resquircle

CI

React Native reSquircle

What is a squircle?

A squircle sits between a square and a circle. Unlike borderRadius, it uses a superellipse formula (|x|^n + |y|^n = r^n) so corners look smoother and more natural. This library draws it natively on iOS and Android via Fabric.

✨ Features

  • 🚀 Native — C++/Kotlin/ObjC, no JS-only hacks
  • Fabric — New Architecture ready (RN 0.80+)
  • 🎨 API like ViewborderRadius, borderWidth, backgroundColor, boxShadow, overflow
  • 🌓 Android shadows — Use shadowColor, shadowOffset, shadowRadius, shadowOpacity or boxShadow instead of just elevation
  • 🧩 RTL — Supports borderTopStartRadius etc.
  • 🎛️ OutlinesoutlineColor, outlineWidth, outlineOffset, outlineStyle

Features overview

📦 Installation

npm

npm install react-native-resquircle

yarn

yarn add react-native-resquircle

⚙️ Setup

| Platform | Command | |----------|---------| | iOS | cd ios && pod install | | Expo | expo prebuild | | Android | — |

📋 Requirements

  • React Native 0.80+
  • iOS 15.1+ / Android API 24+

🚀 Quick start

import { SquircleView, SquircleButton } from 'react-native-resquircle';

// Simple card
<SquircleView style={{ borderRadius: 24, backgroundColor: 'white', padding: 16 }}>
  <Text>Card content</Text>
</SquircleView>

// Button with press feedback
<SquircleButton
  style={{ borderRadius: 20, backgroundColor: '#3B82F6', padding: 16 }}
  activeOpacity={0.85}
>
  <Text style={{ color: 'white' }}>Tap me</Text>
</SquircleButton>

📖 API

SquircleView

Container that clips/renders content in a squircle shape. Accepts standard View props and styles.

| Prop | Type | Default | Description | |------|------|---------|-------------| | cornerSmoothing | number | 0.6 | Smoothing factor 0–1. 0 = rectangle, 1 = maximum curve | | overflow | 'visible' \| 'hidden' | 'visible' | Clip children to squircle boundary | | style | ViewStyle | — | All usual styles: borderRadius, borderWidth, backgroundColor, boxShadow, etc. |

SquircleButton

Pressable squircle. Wraps SquircleView with Pressable. Children can be a function: ({ pressed }) => ...

| Prop | Type | Default | Description | |------|------|---------|-------------| | cornerSmoothing | number | 0.6 | Same as SquircleView | | overflow | 'visible' \| 'hidden' | 'visible' | Same as SquircleView | | activeOpacity | number | 0.85 | Opacity when pressed | | style | ViewStyle | — | Applied to inner SquircleView | | ...PressableProps | — | — | onPress, onLongPress, etc. |

buildBoxShadow

Helper to build a boxShadow CSS-like string from shadow specs. Use with style={{ boxShadow: buildBoxShadow([...]) }}.

buildBoxShadow(shadows: Array<{
  x: number;
  y: number;
  blur: number;
  spread?: number;
  color: string;   // #RGB | #RRGGBB | #RRGGBBAA | rgb() | rgba()
  opacity: number; // 0–100
}>): string
import { buildBoxShadow, SquircleView } from 'react-native-resquircle';

const shadow = buildBoxShadow([
  { x: 0, y: 4, blur: 12, spread: 0, color: '#000', opacity: 25 },
]);

<SquircleView style={{ borderRadius: 16, boxShadow: shadow, backgroundColor: 'white' }}>
  ...
</SquircleView>

Android: With SquircleView / SquircleButton you can use rich shadows via shadowColor, shadowOffset, shadowRadius, shadowOpacity or boxShadow — not limited to elevation like standard RN views.

💡 Examples

Corner smoothing0 = sharp, 1 = most rounded:

<SquircleView cornerSmoothing={0}   style={box} />  {/* rectangle */}
<SquircleView cornerSmoothing={0.5} style={box} />  {/* moderate */}
<SquircleView cornerSmoothing={1}   style={box} />  {/* iOS-style squircle */}

Border + shadow

<SquircleView
  style={{
    borderRadius: 24,
    borderWidth: 2,
    borderColor: '#e5e7eb',
    boxShadow: '0 4px 12px 0 rgba(0,0,0,0.15)',
    backgroundColor: 'white',
  }}
/>

Overflow hidden — clip content to squircle:

<SquircleView overflow="hidden" cornerSmoothing={1} style={cardStyle}>
  <Image source={...} style={{ width: 200, height: 200 }} />
</SquircleView>

🤝 Contributing

📄 License

MIT


Made with ✊ using create-react-native-library