JSFiddle - React, Tailwind, and code Playground

by Kiran G

HTML

<script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>


<body>
    <div id="app">
        <!--  <p v-if="show">hello</p>
        <p v-else="show">hi</p>
        <template v-if="show">
            <h1> Kiran </h1>
        </template> 

        <button @click="show=!show">swich</button>
       <hr> -->
        
         <textarea  class="expand" v-bind:class="{ active: isActive }" @click="activeLink"> </textarea>
         
         
        <div>

        </div>
        <br><br>
        
        <!--

         <button  @click="activeLink"> swich</button>
         <button  @click="activeLink"> swich</button> -->
         



    </div>

CSS

.expand {
  height: 4em;    
  width: 50%;   
  padding: 3px;    
  transition: 0.5s;   
  transition: background-color 1s;
  border-radius: 4px; 
  border: 1px solid #e5e6e7;
}

.active  {
   height: 8em;    
  width: 50%;   
  padding: 3px;    
  transition: 0.5s;   
  transition: background-color 1s;
  border-radius: 4px; 
  border: 1px solid #e5e6e7;
}

JavaScript

new Vue({
            el: '#app',
            data: {
                isActive: false
              },
              methods: {
                activeLink() {
                  this.isActive = true
                }
              }
        });