Open In App

Onsen UI CSS Component Basic Textarea

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 Basic Textarea is used to create the basic textarea with a given number of rows. To create the basic textarea, we will use textarea class.



Onsen UI CSS Component Basic Textarea Class:

Syntax:



<textarea class="textarea" rows=".." 
          placeholder=".."></textarea>

Example 1: The following example demonstrates the Onsen UI CSS Component Basic Textarea.




<!DOCTYPE html>
<html>
  
<head>
    <!-- CDN links of Onsen UI library -->
    <link rel="stylesheet" href=
    <link rel="stylesheet" href=
    <script src=
    </script>
</head>
  
<body>
    <center>
        <h2 style="color: green;">
            GeeksforGeeks
        </h2>
        <strong>
            Onsen UI CSS Component Basic Textarea
        </strong> <br> <br>
  
        <textarea class="textarea" 
                  placeholder="Basic textarea"
                  rows="5" ></textarea>
    </center>
</body>
  
</html>

Output:

 

Example 2: The following example demonstrates the Onsen UI CSS Component Basic Textarea.




<!DOCTYPE html>
<html>
  
<head>
    <!-- CDN links of Onsen UI library -->
    <link rel="stylesheet" href=
    <link rel="stylesheet" href=
    <script src=
    </script>
</head>
  
<body>
    <center>
        <h2 style="color: green;">
            GeeksforGeeks
        </h2>
        <strong>
            Onsen UI CSS Component Basic Textarea
        </strong> <br> <br>
  
        <textarea class="textarea" 
                  placeholder="Textarea 1"
                  rows="4" ></textarea
        <br> <br>
        <textarea class="textarea" 
                  placeholder="Textarea 2"
                  rows="2" ></textarea>
    </center>
</body>
  
</html>

Output:

 

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


Article Tags :