Coder Social home page Coder Social logo

vue-md-breakpoint's Introduction

vue-md-breakpoint

This is a fork of vue-md-breakpoint to allow the overriding of breakpoint widths. Original Package: https://github.com/cb109/vue-md-breakpoint

Access the current breakpoint from the material design spec inside a Vue app. Resizing the browser will update the breakpoint accordingly.

Installation

npm install vue-md-breakpoint
# or:
yarn add vue-md-breakpoint

Usage

You can use it as a mixin for your app.

import Vue from 'vue';
import breakpoint from '@wardy484/vue-md-breakpoint';

// in your app/component:
// breakpoint override is optional, if not provided then the defaults from the original package will be applied
Vue.use(breapoint, {
    breakpoints: {
        xs: 500,
        sm: 700,
        lg: 1000,
        xl: 1300
    }
});

// and in your templates:

<div v-if="$breakpoint.smAndUp"></div>

API

  • $breakpoint.name
  • $breakpoint.xsOnly
  • $breakpoint.smOnly
  • $breakpoint.smAndDown
  • $breakpoint.smAndUp
  • $breakpoint.mdOnly
  • $breakpoint.mdAndDown
  • $breakpoint.mdAndUp
  • $breakpoint.lgOnly
  • $breakpoint.lgAndDown
  • $breakpoint.lgAndUp
  • $breakpoint.xlOnly
  • $breakpoint.width
  • $breakpoint.height

Tests

npm run test

vue-md-breakpoint's People

Contributors

cb109 avatar wardy484 avatar

Stargazers

Johan Roxendal avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.