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

@geajs/mobile

v1.0.0

Published

Mobile-oriented UI primitives for the Gea framework — views, navigation, gestures, and layout components

Readme

@geajs/mobile

npm version License: MIT

Mobile-oriented UI primitives for the Gea framework — full-screen views, iOS-style navigation transitions, back gestures, sidebars, tabs, pull-to-refresh, and infinite scroll.

Installation

npm install @geajs/mobile

@geajs/mobile has a peer dependency on @geajs/core ^1.0.0.

CSS

Import the stylesheet in your entry point:

import '@geajs/mobile/style.css'

Or reference it directly:

import '@geajs/mobile/dist/gea-mobile.css'

Components

View

A full-screen Component that renders to document.body by default. Adds a view attribute for uniform CSS layout and supports navigation transitions.

import { View } from '@geajs/mobile'

class HomeView extends View {
  template() {
    return (
      <view>
        <h1>Welcome</h1>
      </view>
    )
  }

  onActivation() {
    // called when this view enters the viewport
  }
}

| Property | Type | Default | Description | | --- | --- | --- | --- | | index | number | 0 | Z-axis position | | supportsBackGesture | boolean | false | Enable swipe-back gesture | | backGestureTouchTargetWidth | number | 50 | Touch area width (px) for back gesture | | hasSidebar | boolean | false | Allow sidebar reveal via swipe |

ViewManager

Manages a navigation stack of View instances with iOS-style push/pull transitions.

import { ViewManager } from '@geajs/mobile'

const vm = new ViewManager()
const home = new HomeView()

vm.setCurrentView(home)

// Navigate forward (preserving history for back navigation)
vm.pull(detailView, true)

// Go back
vm.push()

| Method | Description | | --- | --- | | pull(view, canGoBack?) | Navigate to a new view. If canGoBack is true, current view is saved in history. | | push() | Go back to the previous view in history. | | setCurrentView(view, noDispose?) | Set the active view without animation. | | canGoBack() | Returns true if there are views in history. | | toggleSidebar() | Toggle the sidebar open/closed. |

GestureHandler

Registers touch gesture events with the component system. These events work via event delegation like all standard DOM events.

Supported gestures: tap, longTap, swipeRight, swipeLeft, swipeUp, swipeDown.

<div swipeRight={() => handleSwipe()}>Swipe me</div>

Sidebar

Slide-out navigation panel. Integrates with ViewManager gestures for reveal/dismiss.

import { Sidebar } from '@geajs/mobile'

class AppSidebar extends Sidebar {
  template_items() {
    return `
      <sidebar-item data-view="home">Home</sidebar-item>
      <sidebar-item data-view="settings">Settings</sidebar-item>
    `
  }
}

TabView

Tab-based view switching with a bottom tab bar and an internal ViewManager.

import { TabView } from '@geajs/mobile'

class MainTabs extends TabView {
  template_views() { /* tab content views */ }
  template_items() { /* tab bar items */ }
}

| Method | Description | | --- | --- | | activateItem(index) | Switch to tab by index | | activateItemByName(name) | Switch to tab by name |

NavBar

Top navigation bar with optional back and menu buttons.

import { NavBar } from '@geajs/mobile'

const nav = new NavBar({
  title: 'My App',
  hasBackButton: true,
  hasMenuButton: false
})

PullToRefresh

Pull-down-to-refresh pattern. Emits a SHOULD_REFRESH event when the user pulls past the threshold.

import { PullToRefresh } from '@geajs/mobile'

const ptr = new PullToRefresh()
ptr.register(scrollElement)

| Method | Description | | --- | --- | | register(scrollEl, containerEl?) | Attach to a scrollable element | | reset() | Reset to idle state after data loads |

InfiniteScroll

Load-more-on-scroll pattern. Emits a SHOULD_LOAD event when the user scrolls near the bottom.

import { InfiniteScroll } from '@geajs/mobile'

const inf = new InfiniteScroll()
inf.register(scrollElement)

| Method | Description | | --- | --- | | register(el) | Attach to a scrollable element | | reset() | Reset state for a new data set | | showSpinner() | Show the loading indicator | | showEndOfList() | Show end-of-list marker |

Full Example

import { View, ViewManager } from '@geajs/mobile'
import '@geajs/mobile/style.css'

class HomeView extends View {
  template() {
    return (
      <view>
        <h1>Home</h1>
        <button click={this.openDetail}>View Detail</button>
      </view>
    )
  }

  openDetail() {
    const detail = new DetailView()
    detail.supportsBackGesture = true
    this.vm.pull(detail, true)
  }
}

class DetailView extends View {
  template() {
    return (
      <view>
        <h1>Detail</h1>
        <p>Swipe from the left edge to go back.</p>
      </view>
    )
  }
}

const vm = new ViewManager()
const home = new HomeView()
home.vm = vm
vm.setCurrentView(home)

Documentation

Full documentation: docs

License

MIT — Copyright (c) 2017-present Armagan Amcalar