Ross ROSS = Recommend OSS · open-source software intelligence for agents

matthewhudson/current-device

📱 The easiest way to write conditional CSS and/or JavaScript based on device operating system (iOS, Android, Blackberry, Windows, Firefox OS, MeeGo), orientation (Portrait vs. Landscape), and type (Tablet vs. Mobile). observed · 2026-10-22

github.com/matthewhudson/current-device · homepage · TypeScript · MIT (permissive) observed · 2026-10-22

Health v2 · maintenance only

98/100

  • Activity 97
  • Release rhythm 97
  • Longevity 100
How is this computed?

round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10) — computed 2026-10-22. Adoption (stars, forks) is never an input.

  • gap_med: 0
  • age_days: 5145
  • days_rel: 23
  • days_push: 21
  • n_releases_24m: 8

Full methodology

Adoption not part of the score

3923 stars · 571 forks observed · 2026-10-22

What it is AI-extracted, prompt v1, taxonomy v1, 2026-08-29, confidence not recorded

A lightweight JavaScript/TypeScript library that detects the device's operating system, type (mobile/tablet/desktop), and orientation, exposing a simple JS API and automatically adding conditional CSS classes to the <html> element. It supports iOS, Android, Blackberry, Windows, macOS, Firefox OS, MeeGo, and more.

Use cases

  • detect if user is on mobile or tablet in javascript
  • apply conditional css based on device operating system
  • detect portrait vs landscape orientation in browser
  • add device-specific css classes to html element
  • serve different styles for ios vs android
  • run mobile-specific javascript logic
  • detect device type in typescript

When to choose

  • you need simple client-side device detection with zero configuration
  • you want both a JavaScript API and automatic CSS classes from one small library
  • you need orientation change callbacks for responsive behavior
  • you want TypeScript types included out of the box

When to avoid

  • you need server-side or user-agent-string-based detection with detailed device metadata
  • you only need responsive layouts, which CSS media queries handle natively
  • you require feature detection rather than device detection
  • you need detection of specific browsers or browser versions

Facets

library · maturity active

ui-components developer-tools web-development frontend mobile-development browser device-detection css-classes responsive-design user-agent mobile-web typescript javascript nodejs

3 sources

Member repositories

RepositoryRoleHealth v2
matthewhudson/current-devicemain98

For agents

markdown · JSON · MCP: product_card(name="matthewhudson/current-device")

Data as of 2026-10-19T08:05:51.212177+00:00 · Report a problem