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

@rajeev02/ui

v0.2.1

Published

Adaptive UI component system — device-aware rendering for phone, tablet, watch, TV, auto

Readme

@rajeev02/ui

npm version license

Adaptive UI system with design tokens, multi-device detection, responsive utilities, accessibility features, and theming — optimized for Indian language typography.

Part of Rajeev SDK — cross-platform infrastructure libraries for building apps that work everywhere.

Why use this?

  • Device-aware design — Automatically adapts touch targets, font sizes, and layouts for phone, tablet, watch, TV, and car
  • Complete token system — Colors, spacing, typography, border radius, shadows, z-index — all in one package
  • Indian language support — Typography stack with proper line heights for Devanagari, Tamil, Bengali, Telugu, and 6 more scripts
  • Dark mode built-ingetTheme("light") / getTheme("dark") — full semantic token set for both
  • Accessibility-first — WCAG contrast ratios, minimum touch targets (44dp+ on phone, 48dp+ on watch)
  • Pure TypeScript — No native dependencies. Works with React Native, Expo, and react-native-web.

Platform Support

| Platform | Engine | Status | | ------------ | ---------- | ------ | | iOS | TypeScript | ✅ | | Android | TypeScript | ✅ | | Web | TypeScript | ✅ | | watchOS | TypeScript | ✅ | | Wear OS | TypeScript | ✅ | | Android Auto | TypeScript | ✅ | | TV | TypeScript | ✅ |

Installation

npm install @rajeev02/ui

Peer Dependencies

  • react >= 18.3.0
  • react-native >= 0.84.0 (optional)

Quick Start

Design Tokens

import {
  colors,
  spacing,
  typography,
  borderRadius,
  shadows,
} from "@rajeev02/ui";

const styles = StyleSheet.create({
  container: {
    padding: spacing.lg, // 16
    backgroundColor: colors.background.primary,
    borderRadius: borderRadius.md, // 8
    ...shadows.sm,
  },
  title: {
    fontSize: typography.fontSize.xl, // 20
    fontWeight: typography.fontWeight.bold,
    fontFamily: typography.fontFamily.sans,
    color: colors.text.primary,
  },
});

Device Detection

import {
  detectDeviceType,
  getMinTouchTarget,
  getResponsiveValue,
} from "@rajeev02/ui";

const device = detectDeviceType(screenWidth, screenHeight);
// → "phone" | "tablet" | "watch" | "tv" | "car" | "desktop"

const touchTarget = getMinTouchTarget(device);
// phone → 44, tablet → 44, watch → 48, tv → 56, car → 64

const fontSize = getResponsiveValue(device, {
  phone: 16,
  tablet: 18,
  watch: 12,
  tv: 24,
  car: 20,
  desktop: 16,
});

Theming

import { getTheme } from "@rajeev02/ui";

const lightTheme = getTheme("light");
const darkTheme = getTheme("dark");

// Use in your app
<View style={{ backgroundColor: theme.colors.background.primary }}>
  <Text style={{ color: theme.colors.text.primary }}>Hello</Text>
</View>

Color Palette

| Token | Light | Dark | Usage | | -------------------- | --------- | --------- | ---------------------- | | colors.primary.500 | #6366F1 | #818CF8 | Primary actions, links | | colors.accent.500 | #F97316 | #FB923C | Saffron accent, CTAs | | colors.success | #10B981 | #34D399 | Success states | | colors.error | #EF4444 | #F87171 | Error states | | colors.warning | #F59E0B | #FBBF24 | Warning states |

Spacing Scale

| Token | Value | Usage | | ------------- | ----- | ---------------- | | spacing.xs | 4 | Tight gaps | | spacing.sm | 8 | Small padding | | spacing.md | 12 | Medium padding | | spacing.lg | 16 | Standard padding | | spacing.xl | 24 | Section spacing | | spacing.xxl | 32 | Large sections |

API Reference

| Export | Type | Description | | ---------------------- | ---------- | ---------------------------------------------------------------- | | colors | object | Full color palette (primary, accent, semantic, background, text) | | spacing | object | Spacing scale (xs through xxxl) | | typography | object | Font families, sizes, weights, line heights | | borderRadius | object | Border radius scale (xs through full) | | shadows | object | Shadow presets (xs through xxl) | | zIndex | object | Z-index layers (base through overlay) | | detectDeviceType() | function | Detect current device form factor | | getMinTouchTarget() | function | Get accessible touch target size for device | | getResponsiveValue() | function | Get device-specific value from a map | | getTheme() | function | Get complete light/dark theme object |

Full Documentation

📖 Complete API docs with all token values

License

MIT © 2026 Rajeev Kumar Joshi