Custom Textarea Component Demo

Preview:

{{ message }}

This is a demonstration how to create components using Vue.js and importing them using the Webdraw Simple HTTP Server. Check the code:

index.html

// ... rest of HTML
import { CustomTextarea } from './textarea.js';

const app = Vue.createApp({
    data() {
        return {
            message: ''
        }
    },
    components: { CustomTextarea }
});
app.mount('#app');
                

textarea.js

export const CustomTextarea = {
    name: 'CustomTextarea',
    props: {
        modelValue: String,
        placeholder: String,
        rows: {
            type: Number,
            default: 4
        }
    },
    template: `...