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.

{info} Try using the up and down arrows as well to navigate the menu.

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

        <vue-context ref="menu">
                <a href="#" @click.prevent="onClick($">
                    Do something
                <a href="#" @click.prevent="onClick($">
                    Do something else

    import { VueContext } from 'vue-context';

    export default {
        components: { VueContext },

        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}"`);