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-liquid-glass-navbar

v1.0.7

Published

High-fidelity liquid glass refraction and dispersion effect for React Native.

Downloads

647

Readme

react-native-liquid-glass-navbar 🍬🪄

A high-fidelity refraction and dispersion (chromatic aberration) effect for React Native, powered by OpenGL ES 2.0. Perfect for glassmorphism, magic lens effects, and premium interactive UI components.

Liquid Glass Navbar Demo

✨ Features

  • Liquid Reveal™ Architecture: A "magic lens" effect that reveals active colors instantaneously as the glass pill glides across tabs.
  • Real-time Refraction: High-performance GPU distortion of the underlying UI content.
  • Chromatic Aberration: Realistic RGB dispersion (color splitting) for a premium optical feel.
  • Interaction Scaling: The liquid lens expands organically during touch gestures (1.2x pop).
  • Smooth Physics: Spring-driven movement with zero-flicker settles.
  • Cross-Platform: Native OpenGL on Android with high-quality animated fallbacks for other platforms.

🚀 Installation

npm install react-native-liquid-glass-navbar
# or
yarn add react-native-liquid-glass-navbar

🪄 Usage

High-Level Navbar (Recommended)

The LiquidGlassNavbar is a production-ready component that handles all gestures, glass physics, and tab rendering out of the box.

import React, { useState } from 'react';
import { View } from 'react-native';
import { LiquidGlassNavbar } from 'react-native-liquid-glass-navbar';
import { House, Search, Bell, User } from 'lucide-react-native';

const MyNavbar = () => {
  const [activeTab, setActiveTab] = useState(0);

  const tabs = [
    { label: 'Home', Icon: House, onPress: () => console.log('Home') },
    { label: 'Explore', Icon: Search },
    { label: 'Alerts', Icon: Bell },
    { label: 'Profile', Icon: User },
  ];

  return (
    <View style={{ flex: 1, backgroundColor: '#FFF' }}>
      <LiquidGlassNavbar 
        tabs={tabs}
        activeIndex={activeTab}
        onTabChange={setActiveTab}
        activeColor="#3498db"
      />
    </View>
  );
};

Low-Level Lens Effect

For custom UI components, you can use the raw LiquidGlassView.

import { LiquidGlassView } from 'react-native-liquid-glass-navbar';

// Use with Animated.Value for silky smooth transitions
<LiquidGlassView
  pillX={indicatorPosition}
  pillWidth={120}
  refractionMag={0.15}
  aberration={0.8}
/>

⚙️ Props

LiquidGlassNavbar

| Prop | Type | Default | Description | |---|---|---|---| | tabs | TabItem[] | Required | Array of { label, Icon, onPress }. | | activeIndex | number | 0 | Controlled active index. | | onTabChange | (idx: number) => void | - | Callback when a tab is selected. | | activeColor | string | #000000 | Color of the icon/text when active. | | inactiveColor | string | #8E8E93 | Color of the icon/text when inactive. | | iconSize | number | 24 | Icon size in DP. | | fontSize | number | 12 | Label font size in DP. | | glassProps | LiquidGlassConfig| {} | Fine-tune refractionMag and aberration. | | containerStyle| ViewStyle | - | Outer container styles. |

LiquidGlassView

| Prop | Type | Description | |---|---|---| | pillX | Animated.Value | Horizontal position of the lens center. | | pillWidth | number | Width of the refraction area. | | refractionMag | Animated.Value | Distortion strength (0.01 - 0.2). | | aberration | Animated.Value | Color dispersion strength (0.0 - 1.5). | | interactionScale| Animated.Value | Geometric growth factor (1.0 - 2.0). |

🛠 How it Works

  1. Secret Capture: On mount, the component briefly renders all content in its "active" state and takes a high-speed snapshot via PixelCopy.
  2. GPU Texture: This snapshot is uploaded to the GPU as a background texture.
  3. Refraction Shader: A custom GLSL fragment shader calculates a capsule-shaped lens distortion in real-time.
  4. Liquid Reveal: As the pill moves, it samples from the "active" texture, while the underlying background UI remains inactive, creating the "magic reveal" effect.

🤝 Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

📄 License

MIT © Liquid Glass Contributors