Skip to content

Gea Mobile Overview

@geajs/mobile extends the Gea framework with mobile-oriented UI primitives: full-screen views, iOS-style navigation transitions, back gestures, sidebars, tab bars, pull-to-refresh, and infinite scroll.

Installation

bash
npm install @geajs/mobile

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

CSS

Import the stylesheet in your entry point:

js
import '@geajs/mobile/style.css'

This provides base styles for views, transitions, and the built-in components.

Components at a Glance

ComponentPurpose
ViewFull-screen component with transition support
ViewManagerNavigation stack with push/pull transitions
GestureHandlerTouch gesture recognition (tap, swipe, long tap)
SidebarSlide-out navigation panel
TabViewTab-based view switching
NavBarTop navigation bar
PullToRefreshPull-down-to-refresh pattern
InfiniteScrollLoad-more-on-scroll pattern

Quick Example

jsx
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}>Open 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)

Released under the MIT License.