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

@sigx/lynx-appearance

v0.7.0

Published

System appearance (color scheme observation + status/navigation bar tint setters) for sigx-lynx

Readme

@sigx/lynx-appearance

System color-scheme observer + status-bar / navigation-bar tint setters for sigx-lynx. The native publisher writes lynx.__globalProps.appearance before MT first paint, so the initial light/dark value is available on cold start with no flash; subsequent system flips publish through GlobalEventEmitter and update a BG signal.

📚 Documentation

Full guides, API reference and live examples → https://sigx.dev/lynx/modules/appearance/overview/

Install

pnpm add @sigx/lynx-appearance

sigx prebuild auto-discovers the package, registers AppearanceModule / AppearancePublisher on both platforms, and wires the iOS host VC to forward preferredStatusBarStyle to the module so setStatusBarStyle(...) actually takes effect.

Usage

Mount the provider once near the root, then read the color scheme reactively from any component:

import { component, effect } from '@sigx/lynx';
import {
    AppearanceProvider,
    useSystemColorScheme,
    setSystemBarsStyle,
} from '@sigx/lynx-appearance';

const Root = component(() => () => (
    <AppearanceProvider>
        <App />
    </AppearanceProvider>
));

const App = component(() => {
    const scheme = useSystemColorScheme();

    // Keep the system bars in sync with the current scheme.
    effect(() => {
        void setSystemBarsStyle({
            statusBar: scheme.value === 'dark' ? 'light' : 'dark',
            statusBarBackground: scheme.value === 'dark' ? '#000' : '#fff',
            navigationBar: { style: scheme.value === 'dark' ? 'light' : 'dark' },
        });
    });

    return () => (
        <text>System is {scheme.value} mode</text>
    );
});

From inside a 'main thread' worklet, use the sync variant — no subscription, reads lynx.__globalProps directly:

import { useSystemColorSchemeMT } from '@sigx/lynx-appearance';
// inside a main-thread worklet body:
const isDark = useSystemColorSchemeMT() === 'dark';

API

| Surface | Use for | |---|---| | AppearanceProvider | Mount once near the root. Provides the live color-scheme signal to descendants. | | useSystemColorScheme() | BG-side reactive read. Returns a signal of 'light' \| 'dark'. Re-runs effects when the user flips dark mode in system settings. | | useSystemColorSchemeMT() | MT-side sync read. Returns 'light' \| 'dark' from lynx.__globalProps. For use inside 'main thread' worklet bodies. | | setStatusBarStyle(style) | Set status-bar content tint. 'light' = light icons (legible on dark bg). | | setStatusBarBackgroundColor(color) | Android only — status-bar background color (null clears). iOS resolves { ok: false, reason: 'unsupported' }. | | setNavigationBarStyle({ style, color? }) | Android only — navigation-bar tint + optional background. iOS resolves { ok: false, reason: 'unsupported' }. | | setSystemBarsStyle({ statusBar?, statusBarBackground?, navigationBar? }) | Convenience — apply all three in one deterministic call. Returns first non-unsupported failure, or { ok: true }. | | isAvailable() | Whether the native Appearance module is registered in the current build. | | APPEARANCE_EVENT | The event name ('appearanceChanged') fired by the native publishers. Exported so iOS / Android / JS agree on a single string. |

type ColorScheme = 'light' | 'dark';
type SystemBarStyle = 'light' | 'dark';
interface SetterResult {
    ok: boolean;
    /** Present when `ok === false` — e.g. `'unsupported'` on iOS for
     *  nav-bar / status-bar-background calls. */
    reason?: string;
}

All setters return Promise<SetterResult> and never reject — unwired platforms, web preview, SSR, and test runs all resolve to { ok: false, reason: 'unsupported' }. You can therefore void setSystemBarsStyle(...) without risking unhandled rejections.

Gotchas

  • iOS status-bar style needs host VC forwarding. setStatusBarStyle(...) resolves successfully but won't visibly change anything unless the host view controller forwards preferredStatusBarStyle to AppearanceModule.preferredStatusBarStyle. The lynx-cli iOS template does this automatically; if you're integrating into an existing UIViewController, copy the forwarding pattern.
  • Android 15+ (API 35) edge-to-edge. setStatusBarBackgroundColor is a no-op at the system level on API 35+ because edge-to-edge is enforced. Render your own background view inside the safe-area top padding instead — pairs naturally with @sigx/lynx-safe-area.
  • 'light' vs 'dark' is the content tint, not the background. style: 'light' means "light-colored icons" (so a dark background behind them is legible). Easy to flip the wrong way the first time.
  • Cold-start value. readGlobalColorScheme() reads the value the native publisher wrote before first paint. If it returns null (e.g. running on a host that didn't link the publisher), the hook seeds 'light' as a safe default.

License

MIT