npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

vue-breakpoint-compass

v1.2.3

Published

An easy to use plugin that makes responsive design with css breakpoints even easier.

Downloads

13

Readme

Vue Breakpoint Compass


About

A typescript-ready vue 3 plugin created to provide web designers with more detailed feedback as to how the current window size fits into any given set of CSS breakpoints. A small display shows the breakpoint name and how far away the nearest breakpoints are in pixel percentages with a progressbar.

Demo

Features

  • Includes over a dozen importable breakpoint sets from popular web frameworks
  • Add your own custom breakpoint set, or modify existing sets
  • Breakpoint set objects can be used in other components via inject
  • Draggable interface
  • Makes an excellent template for creating similar vue plugin projects

Install

npm i vue-breakpoint-compass

Setup

Import: (in your main.js or main.ts)


import {BreakpointCompassPlugin} from "vue-breakpoint-compass";
import { createApp } from 'vue'
const app = createApp({})
// for default of top right position and tailwind v3 breakpoints:
app.use(BreakpointCompassPlugin);

//custom options example (breakpoints can be in any order but must be in correct object array format)
app.use(BreakpointCompassPlugin, {
  position: "bl",
  breakpointSet: [
    { name: "tiny", px: 300 },
    { name: "bigger", px: 600 },
    { name: "biggest", px: 1200 },
  ],
});

// TS users may also want to import BreakpointCompassOptions to type a custom option object.
import {BreakpointCompassPlugin, BreakpointCompassOptions} from "vue-breakpoint-compass";

<!-- Options struct: -->
const MyOptions: BreakpointCompassOptions = {
  position: "tr",
  breakpointSet:  [
    // class name and associated min screen width in object format for each breakpoint
    { name: "sm", px: 640 },
    { name: "md", px: 768 },
    { name: "lg", px: 1024 },
    { name: "xl", px: 1280 },
    { name: "2xl", px: 1536 }]
  }

Valid position settings

  • 'tr' top right (default)
  • 'tl' top left
  • 'br' bottom right
  • 'bl' bottom left

Importable breakpoint presets

  • breakpointsBootstrapv5
  • breakpointsBootstrapv4
  • breakpointsBootstrapv3
  • breakpointsWindicss
  • breakpointsTailwind
  • breakpointsQuasar
  • breakpointsBulma
  • breakpointsChakra
  • breakpointsFoundation
  • breakpointsIonic
  • breakpointsMaterialUI
  • breakpointsMaterialize
  • breakpointsSkeleton
  • breakpointsSemanticUI
  • breakpointsVuetify
import breakpointsBootstrapv5 from "vue-breakpoint-compass";

app.use(BreakpointCompassPlugin, { breakpointSet: breakpointsBootstrapv5 });

Usage

Use: (in your local .vue template/component) during design phase or responsiveness fine-tuning process

<breakpoint-compass/>

// if you're too lazy to remove the plugin before deploying to production you could always use conditional rendering to show only during development
<breakpoint-compass v-if="devModeActive" />

Support

If you find this plugin useful, please consider leaving a tip.