Top Related Projects
A powerful cross-platform UI toolkit for building native-quality iOS, Android, and Progressive Web Apps with HTML, CSS, and JavaScript.
Quasar Framework - Build high-performance VueJS user interfaces in record time
⚡ Empowering JavaScript with native platform APIs. ✨ Best of all worlds (TypeScript, Swift, Objective C, Kotlin, Java, Dart). Use what you love ❤️ Angular, Capacitor, Ionic, React, Solid, Svelte, Vue with: iOS (UIKit, SwiftUI), Android (View, Jetpack Compose), Dart (Flutter) and you name it compatible.
access core functions on Android, iPhone and Blackberry using JavaScript
Quick Overview
Framework7 is a free and open-source HTML framework for developing mobile, desktop, or web apps with a native look and feel. It's platform-agnostic and can be used with or without Vue.js, React, or Svelte for building iOS & Android apps, Progressive Web Apps, or desktop apps via Electron.
Pros
- Rich UI components and layouts that closely mimic native iOS and Android interfaces
- Flexible and modular architecture allowing developers to use only the components they need
- Supports multiple JavaScript frameworks (Vue, React, Svelte) as well as vanilla JavaScript
- Extensive documentation and active community support
Cons
- Learning curve can be steep for developers new to mobile app development
- Performance may not match truly native apps in complex scenarios
- Limited customization options for some components without diving into the source code
- May require additional plugins or libraries for advanced features like push notifications
Code Examples
- Creating a basic page structure:
<div class="page">
<div class="navbar">
<div class="navbar-inner">
<div class="title">My App</div>
</div>
</div>
<div class="page-content">
<p>Page content goes here</p>
</div>
</div>
- Initializing Framework7 app:
const app = new Framework7({
root: '#app',
name: 'My App',
id: 'com.myapp.test',
theme: 'auto',
});
- Creating a popup:
app.popup.create({
content: `
<div class="popup">
<div class="page">
<div class="navbar">
<div class="navbar-inner">
<div class="title">Popup</div>
<div class="right">
<a href="#" class="link popup-close">Close</a>
</div>
</div>
</div>
<div class="page-content">
<p>Popup content goes here</p>
</div>
</div>
</div>
`,
}).open();
Getting Started
-
Install Framework7:
npm install framework7
-
Create an HTML file with basic structure:
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no, viewport-fit=cover"> <title>My App</title> <link rel="stylesheet" href="path/to/framework7.bundle.min.css"> </head> <body> <div id="app"></div> <script src="path/to/framework7.bundle.min.js"></script> <script src="js/app.js"></script> </body> </html>
-
Initialize the app in your JavaScript file (app.js):
const app = new Framework7({ root: '#app', name: 'My App', id: 'com.myapp.test', routes: [ // Define your app routes here ], });
Competitor Comparisons
A powerful cross-platform UI toolkit for building native-quality iOS, Android, and Progressive Web Apps with HTML, CSS, and JavaScript.
Pros of Ionic Framework
- Larger community and ecosystem, with more resources and third-party plugins
- Better integration with Angular, React, and Vue.js frameworks
- More comprehensive documentation and learning resources
Cons of Ionic Framework
- Steeper learning curve, especially for developers new to web technologies
- Larger bundle sizes, which can impact app performance on low-end devices
- More opinionated structure, which may limit flexibility in some cases
Code Comparison
Framework7 (HTML structure):
<div class="page">
<div class="navbar">
<div class="navbar-inner">
<div class="title">My App</div>
</div>
</div>
<div class="page-content">
<!-- Content goes here -->
</div>
</div>
Ionic Framework (Angular component):
@Component({
selector: 'app-home',
template: `
<ion-header>
<ion-toolbar>
<ion-title>My App</ion-title>
</ion-toolbar>
</ion-header>
<ion-content>
<!-- Content goes here -->
</ion-content>
`
})
export class HomePage { }
Both frameworks offer similar functionality for building mobile apps using web technologies. Framework7 is more lightweight and easier to get started with, while Ionic Framework provides better integration with popular JavaScript frameworks and has a larger ecosystem. The choice between the two depends on your specific project requirements and familiarity with web development technologies.
Quasar Framework - Build high-performance VueJS user interfaces in record time
Pros of Quasar
- Built on Vue.js, offering a more modern and flexible framework
- Extensive UI component library with Material Design and iOS theme support
- Supports multiple build modes: SPA, SSR, PWA, and mobile/desktop apps
Cons of Quasar
- Steeper learning curve for developers new to Vue.js ecosystem
- Less focus on native-like mobile UI compared to Framework7
Code Comparison
Framework7 (HTML-based):
<div class="page">
<div class="navbar">
<div class="navbar-inner">
<div class="title">My App</div>
</div>
</div>
<div class="page-content">
<!-- Content goes here -->
</div>
</div>
Quasar (Vue.js-based):
<template>
<q-layout view="lHh Lpr lFf">
<q-header elevated>
<q-toolbar>
<q-toolbar-title>My App</q-toolbar-title>
</q-toolbar>
</q-header>
<q-page-container>
<!-- Content goes here -->
</q-page-container>
</q-layout>
</template>
Both frameworks offer powerful tools for building mobile and web applications, but Quasar leverages Vue.js for a more component-based approach, while Framework7 provides a more traditional HTML-based structure. Quasar excels in versatility and modern web development practices, while Framework7 focuses on creating native-like mobile experiences.
⚡ Empowering JavaScript with native platform APIs. ✨ Best of all worlds (TypeScript, Swift, Objective C, Kotlin, Java, Dart). Use what you love ❤️ Angular, Capacitor, Ionic, React, Solid, Svelte, Vue with: iOS (UIKit, SwiftUI), Android (View, Jetpack Compose), Dart (Flutter) and you name it compatible.
Pros of NativeScript
- Provides true native performance by compiling to native code
- Allows direct access to native APIs and platform-specific features
- Supports TypeScript, offering better type checking and tooling
Cons of NativeScript
- Steeper learning curve, especially for developers new to mobile development
- Smaller community and ecosystem compared to Framework7
- May require platform-specific code for certain features
Code Comparison
NativeScript (XML and TypeScript):
<StackLayout>
<Label text="Hello, NativeScript!" />
<Button text="Click Me" tap="onButtonTap" />
</StackLayout>
export function onButtonTap() {
console.log("Button tapped!");
}
Framework7 (HTML and JavaScript):
<div class="page">
<div class="navbar">
<div class="navbar-inner">
<div class="title">Hello, Framework7!</div>
</div>
</div>
<div class="page-content">
<a class="button" id="myButton">Click Me</a>
</div>
</div>
$$('#myButton').on('click', function () {
console.log('Button clicked!');
});
access core functions on Android, iPhone and Blackberry using JavaScript
Pros of PhoneGap
- Broader platform support, including iOS, Android, Windows, and more
- Extensive plugin ecosystem for accessing native device features
- Simpler learning curve for web developers
Cons of PhoneGap
- Performance can be slower compared to native apps
- User interface may not feel as native or smooth
- Limited access to some advanced device features
Code Comparison
PhoneGap:
document.addEventListener('deviceready', onDeviceReady, false);
function onDeviceReady() {
console.log('PhoneGap is ready');
navigator.geolocation.getCurrentPosition(onSuccess, onError);
}
Framework7:
var app = new Framework7({
root: '#app',
name: 'My App',
theme: 'auto',
routes: [
// Define your routes here
]
});
Framework7 focuses on creating a UI that looks and feels like native iOS and Android apps, while PhoneGap provides a wrapper for web technologies to access native device features. Framework7 offers better performance and a more native-like experience, but PhoneGap has broader platform support and a larger plugin ecosystem. The choice between the two depends on the specific requirements of your project, such as target platforms, performance needs, and desired user experience.
Convert designs to code with AI
Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.
Try Visual CopilotREADME
Framework7
Full Featured Mobile HTML Framework For Building iOS & Android Apps
Supporting Framework7
Framework7 is an MIT-licensed open source project with its ongoing development made possible entirely by the support of these awesome backers. If you'd like to join them, please consider becoming a backer or sponsor on Patreon.
Sponsors
Getting Started
Framework7 Development
First, install all dependencies:
$ npm install
Development Builds
The following npm scripts are available to create development builds:
build:dev
- build development versions of all packages (Core, Vue, React, Svelte)build-core:dev
- build development version of Core (vanilla JS) Framework7build-react:dev
- build development version of Framework7 React packagebuild-vue:dev
- build development version of Framework7 Vue packagebuild-svelte:dev
- build development version of Framework7 Svelte package
Compiled results will be available in build/
folder.
Production Builds
To build production versions the following npm scripts are available:
build:prod
- build production versions of all packages (Core, Vue, React, Svelte)build-core:prod
- build production version of Core (vanilla JS) Framework7build-react:prod
- build production version of Framework7 React packagebuild-vue:prod
- build production version of Framework7 Vue packagebuild-svelte:prod
- build production version of Framework7 Svelte package
Compiled results will be available in packages/
folder.
Kitchen Sink
To run Kitchen Sink with development environment (development version will be built first) use the following npm scripts:
core
- build development version of Core (vanilla JS) Framework7 package and run core Kitchen Sinkreact
- build development version of Framework7 React package and run React Kitchen Sinkvue
- build development version of Framework7 Vue package and run Vue Kitchen Sinksvelte
- build development version of Framework7 Svelte package and run Svelte Kitchen Sink
Source Code
Whole source code is located under the /src/
folder.
Contributing
Before you open an issue please review the contributing guideline.
All changes should be committed to src/
files only!
Framework7 uses LESS for CSS compilations, and ES modules JS files.
The project uses .editorconfig and ESLint to define and lint the coding style of each file. We recommend that you install the Editor Config and ESLint extension for your preferred IDE.
If you want to help in Framework7 development and make it event better visit this page: https://framework7.io/contribute/
Forum
If you have questions about Framework7 or want to help others you are welcome to special forum at https://forum.framework7.io/
Docs
Documentation available at https://framework7.io/docs/
Tutorials
Tutorials available at https://framework7.io/tutorials/
Showcase
Appstore apps made with Framework7: https://framework7.io/showcase/
Previous Versions
Top Related Projects
A powerful cross-platform UI toolkit for building native-quality iOS, Android, and Progressive Web Apps with HTML, CSS, and JavaScript.
Quasar Framework - Build high-performance VueJS user interfaces in record time
⚡ Empowering JavaScript with native platform APIs. ✨ Best of all worlds (TypeScript, Swift, Objective C, Kotlin, Java, Dart). Use what you love ❤️ Angular, Capacitor, Ionic, React, Solid, Svelte, Vue with: iOS (UIKit, SwiftUI), Android (View, Jetpack Compose), Dart (Flutter) and you name it compatible.
access core functions on Android, iPhone and Blackberry using JavaScript
Convert designs to code with AI
Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.
Try Visual Copilot