ERROR [Vue warn]: option “el” can only be used during instance creation with the `new` keyword


I have the following abbreviated vue component:

        <v-card class="mx-auto" color="#26c6da" dark max-width="1200">
        <v-carousel >
            <v-carousel-item v-for="(item,i) in items" :key="i" v-html="item.content"> </v-carousel-item>

    export default {
        el: '#app',
        data: function() {
        return {
            items: res

    <style scoped>
    #app iframe {
        width: 100%;
        height: 500px;

I want to add the css at the bottom to control the carousel appearance. To do this I tried to declare the ‘el’ property and hang the css on that. I;m getting the error in the title. How do I fix this?


You do not need el: '#app', in your component. That is only used when initiating a new Vue app.

Further your css will automagically be scoped to that component instance per your scoped attribute on the style tag.

If the Iframe is nested in another compnent you will need to use the deep selector:

<style scoped>
    /deep/ iframe {
        width: 100%;
        height: 500px;

Leave a Reply

Your email address will not be published. Required fields are marked *