Mode:
Duration:
1
Coding works best on desktop or with an external keyboard.
Coding works best on desktop or with an external keyboard.
Counter app with light/dark theme toggle using Framework7.
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="https://unpkg.com/framework7/framework7-bundle.min.css">
<script src="https://unpkg.com/framework7/framework7-bundle.min.js"></script>
<style>
.dark { background-color:#333; color:#fff; }
.light { background-color:#fff; color:#000; }
</style>
</head>
<body class="light">
<div id="app">
<div class="view view-main">
<div class="page">
<div class="navbar"><div class="title">Dark Mode Counter</div></div>
<div class="page-content" style="text-align:center;">
<p id="count" style="font-size:24px;">0</p>
<button onclick="increment()">+</button>
<button onclick="decrement()">-</button>
<button onclick="reset()">Reset</button>
<button onclick="toggleTheme()">Toggle Theme</button>
</div>
</div>
</div>
</div>
<script>
let count = 0;
function render() { document.getElementById('count').textContent = count; }
function increment() { count++; render(); }
function decrement() { count--; render(); }
function reset() { count = 0; render(); }
function toggleTheme() { document.body.className = document.body.className === 'light' ? 'dark' : 'light'; }
</script>
</body>
</html>Onsen UI is an open-source framework for building hybrid and mobile web apps using HTML5, CSS, and JavaScript. It provides ready-to-use UI components optimized for iOS and Android, supporting frameworks like Angular, React, and Vue.
Origin & Creator
Developed by Monaca (Asial Corporation) in 2013, Onsen UI was created to simplify hybrid mobile app development using web technologies while providing native-like UI components.
Industrial Note
Best suited for hybrid apps and progressive web apps requiring native-style UI with minimal platform-specific customization.