Open In App

Onsen UI CSS Component Underbar Text Input

Last Updated : 03 Jul, 2022
Improve
Improve
Like Article
Like
Save
Share
Report

Onsen UI CSS 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 CSS Component Underbar Text Input is used to create the text input with the underbar. To create the UnderBar Text Input, we will use the text-input–underbar class.

Onsen UI CSS Component Underbar Text Input Class:

  • text-input–underbar: This class is used to create the underbar text input.

Syntax:

<div>
    <input type="text" 
    class="text-input 
           text-input--underbar" 
    placeholder="..." value="">
</div>

Example 1: The following example demonstrates the Onsen UI CSS Component Underbar Text Input.

HTML




<!DOCTYPE html>
<html>
  
<head>
    <!-- CDN links of Onsen UI library -->
    <link rel="stylesheet" href=
    <link rel="stylesheet" href=
    <script src=
    </script>
</head>
  
<body>
    <center>
        <h1 style="color: green;">
            GeeksforGeeks
        </h1>
        <h3>
            Onsen UI CSS Component Underbar Text Input
        </h3>
        <div>
            <input type="text" 
                   class="text-input 
                          text-input--underbar" 
                   placeholder="Type.." value="">
        </div>
    </center>
</body>
</html>


Output:

 

Example 2: The following example demonstrates the Onsen UI CSS Component Underbar Text Input by disabling the underbar text input.

HTML




<!DOCTYPE html>
<html>
  
<head>
    <!-- CDN links of Onsen UI library -->
    <link rel="stylesheet" href=
    <link rel="stylesheet" href=
    <script src=
    </script>
</head>
  
<body>
    <center>
        <h1 style="color: green;">
            GeeksforGeeks
        </h1>
        <h3>
            Onsen UI CSS Component Underbar Text Input
        </h3>
        <div>
            <input type="text" 
                   class="text-input 
                          text-input--underbar" 
                   placeholder="Type.." value="">
        </div> <br>
        <div>
            <input type="text" 
                   class="text-input 
                          text-input--underbar" 
                   placeholder="This is disabled.." 
                   value="" disabled>
        </div>
    </center>
</body>
</html>


Output:

 

Reference: https://onsen.io/v2/api/css.html#text-input-category



Like Article
Suggest improvement
Share your thoughts in the comments

Similar Reads