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
| Component | Purpose |
|---|---|
| View | Full-screen component with transition support |
| ViewManager | Navigation stack with push/pull transitions |
| GestureHandler | Touch gesture recognition (tap, swipe, long tap) |
| Sidebar | Slide-out navigation panel |
| TabView | Tab-based view switching |
| NavBar | Top navigation bar |
| PullToRefresh | Pull-down-to-refresh pattern |
| InfiniteScroll | Load-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)