A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/PxyUp/vue-not-visible below:

PxyUp/vue-not-visible: Vue directive for conditional rendering element on screen smaller than breakpoints

Vue directive for conditional rendering (like v-if) element on screen smaller than breakpoints;

import Vue from 'vue'
import vueNotVisible from 'vue-not-visible'

/* const BREAKPOINTS = {
    mobile: 425,
    tablet: 768,
    tablet_landscape: 1024,
    desktop: 1200,
    desktop_large: 1440,
    hd: 1920,
}
*/
Vue.use(vueNotVisible) // this is default
<template>
  <div id="test">
        {{ message }} {{ count }}
        <div v-not-visible="'tablet'"> 
            <div v-on:click="count = count + 1">Not visible on table(screen < 768)</div>
        </div>
        <div v-not-visible="'mobile'">
            <div v-on:click="count = count + 1">Not visible on mobile(screen < 425)</div>
        </div>
    </div>
</template>
import Vue from 'vue'
import vueNotVisible from 'vue-not-visible'

Vue.use(vueNotVisible, {ipad: 1280}) // this is custom

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4