Open In App

Onsen UI

Last Updated : 10 Jul, 2023
Improve
Improve
Like Article
Like
Save
Share
Report

Onsen UI is used to create beautiful HTML components. It is one of the most efficient ways to create HTML5 hybrid components that are compatible with both mobile and desktop. Onsen UI is a cutting-edge and practical HTML5 framework that is available for use for free.

Onsen-UI Tutorial

It simplifies UI development so that app developers may concentrate on the functionality of the software. Because it provides a huge selection of premium UI elements designed especially for mobile apps and packed with attributes that follow native iOS and Android design standards, Onsen UI is an excellent resource. Onsen UI is made to work with AngularJS, but it can also be used with jQuery or any other framework with ease. The Onsen UI JavaScript framework was created using PhoneGap and Cordova.

Onsen UI can also be used along several Javascript frameworks such as ReactJS, Angular, and jQuery. Onsen UI is a free open-source HTML5 framework for creating innovative and usable user interfaces (UI). It also simplifies user interface design, letting app developers concentrate on the program’s functionality. Onsen UI was created by Monaca Inc/ Asial Corporation and was first released in 2013.

 

Reasons to learn Onsen-UI:

  • It is a powerful tool to build complex mobile apps than also it is easy to learn and work with. Allows us to work with the technologies we already know i.e. HTML, CSS, and Javascript. It has a variety of UI components like toolbars, forms, side menus, lists, etc. It has optimized all the animations provided in it and tuned them to perform well on a wide range of devices. Supported Monaca which is a cross-platform for building hybrid app developments using PhoneGap or Cordova. It has support for Monaca.
ONSEN UI

ONSEN UI

Features of Onsen-UI:

  • It is an open-source HTML5 hybrid app framework for PhoneGap and Cordova.
  • It has a responsive layout.
  • It has mobile-optimized HTML5, CSS, and Javascript with web components.
  • It is full of ready-to-use features that adhere to native design standards for iOS and Android
  • It has a sizable collection of high-quality UI elements created especially for mobile apps
  • It has a flat design.

Installation of Onsen-UI: There are 3 methods to add Onsen-UI is our project.

Method 1: We can simply download Onsen-UI from this link and use it in our project.

Method 2 (Using Onsen-UI CDN Link): We can simply add Onsen-UI to our projects using the following CDN link in our file.

<link rel=”stylesheet” href=”https://unpkg.com/onsenui/css/onsenui.css”>
<link rel=”stylesheet” href=”https://unpkg.com/onsenui/css/onsen-css-components.min.css”>
<script src=”https://unpkg.com/onsenui/js/onsenui.min.js”></script>

Method 3 (Using npm): There is another way of adding Onsen-UI to our project using npm by giving the following command.

npm install onsenui --save

Example: In this example, we will create a button using Onsen-UI and display an alert on clicking it using Onsen-UI.

HTML




<!DOCTYPE html>
<html>
<head>
    <link rel="stylesheet" href=
    <link rel="stylesheet" href=
    <script src=
      </script>
</head>
  
<body style="text-align:center">
    <h1 style="color:green">
        Geeks for Geeks
    </h1>
    <h3>
        Onsen-UI
    </h3>
    <button class="button" onclick="alert('Hello World!')">
          Click Me
      </button>
</body>
</html>


Output:

Output

Output

Learn more about Onsen-UI:



Like Article
Suggest improvement
Previous
Next
Share your thoughts in the comments

Similar Reads