How To

Customize the card image title position

Card Image titles are placed as always Bottom-Left Corner only, You can manually customize to placing titles anywhere over the image by adding styles.

Source
Preview
app.vue
<template>
  <div id="app">
       <div>
            <div class="e-card">
                <div class="e-card-image">
                    <div class="e-card-title">Node.js</div>
                </div>
                <div class="e-card-content">
                    Node.js is a wildly popular platform for writing web applications that has revolutionized web development in many ways, enjoying
                    support across the open source community as well as industry.
                </div>
        </div>
    </div>
    <div style="Margin: 5px 0;width:300px">
      <ejs-dropdownlist id='title_position' :dataSource='dropData' placeholder="Select Position" :change="changed"></ejs-combobox>
    </div>
  </div>
</template>
<script>
import Vue from 'vue';
import { DropDownListPlugin } from "@syncfusion/ej2-vue-dropdowns";
Vue.use(DropDownListPlugin);

export default {
  name: 'app',
data: function() {
    return {
      dropData: ['BottomLeft', 'TopLeft', 'TopRight', 'TopRight'];
    };

  }, methods:{

 changed: function(e) {

    var cardEle = document.querySelector('.e-card');
    var titleEle = cardEle.querySelector('.e-card-image .e-card-title');
    titleEle.className = ''
    titleEle.classList.add('e-card-title');
    titleEle.classList.add(e.value.toLowerCase());
}

  }
}
</script>
<style>
  @import "../../node_modules/@syncfusion/ej2-vue-layouts/styles/material.css";

#container {
    visibility: hidden;
}

#loader {
    color: #008cff;
    height: 40px;
    left: 45%;
    position: absolute;
    top: 45%;
    width: 30%;
}

</style>

Integrate other component inside the card

You can integrate any component inside the card element. Here ListView component is placed inside the card for showcasing the To-Do list.

Source
Preview
app.vue
<template>
  <div id="app">
        <div style="margin: 50px;">
            <!--element which is going to render the Card-->
            <div tabindex="0" class="e-card" id="basic">
                <div class="e-card-title">To-Do List</div>
                <div class="e-card-separator"></div>
                <div class="e-card-content">
                    <div id='element'></div>
                </div>
            </div>
        </div>
  </div>
</template>
<script>
import Vue from 'vue';
import { ListView } from '@syncfusion/ej2-lists';

export default {
  name: 'app',
  data(){


  },mounted(){

//Initialize ListView component
var listviewInstance: ListView = new ListView({
    dataSource: [
    {  todoList: 'Pay Bills' },
    {  todoList: 'Call Chris' },
    {  todoList: 'Meet Andrew' },
    {  todoList: 'Visit Manager' },
    {  todoList: 'Customer Meeting' },
],
    //map the appropriate columns to fields property
    fields: { text: 'todoList' },
},"#element");
  }
  }
}
</script>
<style>
  @import "../../node_modules/@syncfusion/ej2-vue-layouts/styles/material.css";

#container {
    visibility: hidden;
}

#loader {
    color: #008cff;
    height: 40px;
    left: 45%;
    position: absolute;
    top: 45%;
    width: 30%;
}

</style>