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

@hopline/ux4g-react-native

v0.1.0

Published

Zero-dependency React Native components for UX4G, India's government design system. Unofficial community packaging (© NeGD · MeitY · ux4g.gov.in).

Readme

@hopline/ux4g-react-native

React Native components for UX4G — India's government design system (NeGD · MeitY · ux4g.gov.in). Unofficial, community packaging by Hopline.

41 components, genuinely native (RN primitives + react-native-svg — no WebView, no DOM), strict TypeScript (no any), themeable, and driven by a single design-token source of truth.

npm install @hopline/ux4g-react-native react-native-svg
# or: pnpm add / yarn add

Peer deps: react >=18, react-native >=0.73, react-native-svg >=15. Works in bare RN and Expo.

Quick start

Wrap your app in ThemeProvider, then use components:

import { ThemeProvider, Button, Input, Card } from "@hopline/ux4g-react-native";

export default function App() {
  return (
    <ThemeProvider>
      <Card title="Apply for a scheme">
        <Input label="Full name" required />
        <Button onPress={submit}>Submit</Button>
      </Card>
    </ThemeProvider>
  );
}

Theming

The whole system re-skins from two ramps + the font families ("Theme Craft"). Pass a full 50–900 colour ramp:

import { ThemeProvider, ramp } from "@hopline/ux4g-react-native";

<ThemeProvider primary={{ ...ramp.violet, 600: "#0EA5E9" }}>
  {/* every component now uses your brand colour */}
</ThemeProvider>;

Or build a theme object once with makeTheme({ primary, secondary, fontFamily }) and pass it as the theme prop. Read the active theme anywhere with useUX4GTheme(). Every component also accepts an optional theme prop override.

Fonts

The default theme references NotoSans (body/display), Roboto-Medium (UI labels) and RedHatMono (mono). Register these in your app (e.g. expo-font / @expo-google-fonts), or override fontFamily to use your own.

Components (41)

| Group | Components | |---|---| | Actions | Button, IconButton | | Forms | Input, Textarea, Select, Checkbox, Radio, Switch, Search, DatePicker, RangeSlider, ColorPicker, FileUpload | | Display | Card, Badge, Chip, Avatar, Comment | | Feedback | Alert, Progress, Spinner, EmptyState, FeedbackWidget | | Overlay | Modal, Tooltip, Menu, Toast, Popover | | Data | Table, Accordion, Pagination, List, Chart, IndiaMap | | Navigation | Tabs, Breadcrumb, Stepper, Navbar, Footer | | Media | Carousel | | Accessibility | AccessibilityWidget |

Plus IndiaGeo (the SVG geography data behind IndiaMap).

Design tokens (single source of truth)

The raw token primitives (colour ramps, spacing, radius, border) live in tokens/ux4g.primitives.tokens.json in the DTCG format and are emitted to src/tokens.generated.ts by node scripts/gen-tokens.mjs. The semantic theme (aliases, shadows, type scale) is assembled in theme.ts. Edit the JSON, not the generated file — the same DTCG source can feed web (CSS), Compose, and SwiftUI via Style Dictionary.

Native performance

These are real React Native components, so on the New Architecture (Fabric + Hermes, the default on RN 0.76+/recent Expo) they render at native speed.

Lists & virtualization. Select virtualizes its dropdown with FlatList, so long option lists (countries, currencies) mount only the visible window. Components that render inherently bounded collections — Tabs, Breadcrumb, Pagination, Accordion, Chart, IndiaMap (37 fixed regions), Carousel — use Array.map deliberately; virtualizing them would be wrong.

Table and List render the rows/items you give them eagerly (no windowing). They're designed to sit inside your page layout, so for large datasets paginate them with the Pagination component (render a page of rows at a time) rather than handing them thousands of rows — or wrap your data in your own FlatList.

Dropping to native. For genuine performance hot-paths (heavy compute, a platform-native view, camera/ML), drop to Kotlin/Swift via the Expo Modules API and call it from JS — you stay in React Native to do it.

Accessibility

Components ship sensible roles, labels and states (e.g. Checkbox exposes accessibilityState, Button exposes disabled, overlays trap and label their controls). The AccessibilityWidget provides an in-app a11y panel (text scaling, contrast, dyslexia/ADHD aids, etc.). On native, prefer cooperating with OS settings (Dynamic Type, Reduce Motion, screen readers) for the features the OS already owns.

License

MIT © Hopline. UX4G is © NeGD · MeitY, Government of India; this is unofficial community packaging.