Basic Usage Demo

Explore the basics of the context menu through this basic usage demo.

Basic Usage

{info} Right click on each item to open the context menu.

        <table class="table-left border-collapse shadow-none">
                <tr v-for="(item, index) in items"
                    <td v-text="item"></td>

        <v-context ref="menu">
                <li @click="onClick($">Do something</li>
                <li @click="onClick($">Do something else</li>

    import vContext from 'vue-context';

    export default {
        components: { vContext },

        data () {
            return {
                items: [
                    'Cras justo odio',
                    'Dapibus ac facilisis in',
                    'Morbi leo risus',
                    'Porta ac consectetur ac',
                    'Vestibulum at eros'

        methods: {
            onClick (text) {
                alert(`You clicked on: "${text}"`);