Vue Breakpoint Mixin

Use to watch the size of the screen based on Bulma breakpoints.

VueBreakpointMixin is not included in Buefy, you have to install it:

npm install vue-breakpoint-mixin

Tablet Screen

Screen Size: m

Adjust screen to see different messages

  <div id="main">
    <h1 v-if="isMobile">Mobile Screen</h1>
    <h1 v-else-if="isTablet">Tablet Screen</h1>
    <h1 v-else-if="isDesktop">Desktop Screen</h1>
    <h1>Screen Size: <b>{{sizeType}}</b></h1>
    <p>Adjust screen to see different messages</p>

import VueBreakpointMixin from 'vue-breakpoint-mixin';

export default {
  name: 'ExVueBreakpointMixin',
  mixins: [VueBreakpointMixin],

#main {
  font-family: Avenir, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-align: center;
  width: 100%;
  height: 25vh;
  color: #2c3e50;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;

This page is open source. Noticed a typo or something's unclear?

Improve this page on GitHub