Configs2026年7月2日·1 分钟阅读

Onsen UI — Cross-Platform Mobile UI for Web Developers

An HTML5 mobile app development framework providing native-feeling UI components with bindings for React, Vue, and Angular.

Agent 就绪

Agent 可直接安装

这个资产可安装;Agent 先选择当前运行时、检查安装计划,再运行匹配命令。

Native · 98/100策略:允许
Agent 入口
任意 MCP/CLI Agent
类型
Skill
安装
Single
信任
信任等级:Established
入口
Onsen UI Overview
直接安装命令
npx -y tokrepo@latest install f35e3ccb-75ac-11f1-9bc6-00163e2b0d79 --target codex

先 dry-run 确认安装计划,再运行此命令。

Introduction

Onsen UI is an open-source framework for building mobile web apps and hybrid apps using standard web technologies. It provides platform-adaptive UI components that automatically match the look and feel of iOS and Android, letting developers create cross-platform apps with native-quality interactions.

What Onsen UI Does

  • Provides 100+ mobile-optimized UI components based on Web Components
  • Automatically adapts styling between iOS and Material Design based on the platform
  • Offers official bindings for React, Vue, Angular, and vanilla JavaScript
  • Supports Cordova and Capacitor for packaging as native apps
  • Includes page navigation, tab bars, side menus, and gesture handling

Architecture Overview

Onsen UI is built on Custom Elements (Web Components), making the core framework-agnostic. Framework-specific bindings (React, Vue, Angular) wrap these custom elements with idiomatic APIs. The CSS layer uses a dual-theme system that detects the platform at runtime and applies either iOS flat styling or Android Material Design. Animations use CSS transitions and the Web Animations API for smooth 60fps interactions.

Self-Hosting & Configuration

  • Install via npm and import the CSS files and framework binding
  • Use the ons-platform utility to force a specific platform theme if needed
  • Configure page transitions and animation styles globally or per component
  • Works with any build tool that supports ES modules
  • Deploy as a PWA or package with Cordova/Capacitor for app store distribution

Key Features

  • Automatic platform detection with iOS and Android styling
  • Framework-agnostic core with first-class React, Vue, and Angular support
  • Built-in page stack navigation with push/pop transitions
  • Touch-optimized components with gesture recognizers
  • PWA-ready with service worker support and offline capabilities

Comparison with Similar Tools

  • Ionic — Larger ecosystem and community, heavier framework coupling
  • Framework7 — Similar mobile-first approach, tighter iOS design fidelity
  • NativeScript — Compiles to actual native UI, not web-based
  • Quasar — Vue-only, broader target platforms including desktop
  • React Native — True native rendering, requires React and native toolchain

FAQ

Q: Can Onsen UI apps be published to app stores? A: Yes. Package your app with Cordova, Capacitor, or Monaca to build native binaries for iOS and Android app stores.

Q: Does it work with Vue 3? A: Vue 3 support is available through the vue3-onsenui binding package.

Q: How does platform detection work? A: Onsen UI checks the user agent at runtime and applies the matching CSS theme. You can override this to force a specific platform style.

Q: Is Onsen UI free? A: Yes. Onsen UI is fully open source under the Apache 2.0 license.

Sources

讨论

登录后参与讨论。
还没有评论,来写第一条吧。

相关资产