Open In App

Onsen UI CSS Component Basic Textarea

Last Updated : 20 Jul, 2022
Comments
Improve
Suggest changes
Like Article
Like
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 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:

  • textarea: This class is used to create the basic textarea.

Syntax:

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

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

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>
        <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.

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>
        <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



Next Article

Similar Reads