New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

nuxt3-breakpoints

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install
Package was removed
Sorry, it seems this package was removed from the registry

nuxt3-breakpoints

Nuxt breakpoints module

unpublished
latest
npmnpm
Version
1.0.10
Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

nuxt-breakpoints

Nuxt3 ready

Module adds to your app easy way to control web page breakpoints

💿 Installation

First install

npm install nuxt3-breakpoints --save

After the installation in the previous section, you need to add nuxt3-breakpoints module to modules options of nuxt.confg.[ts|js]

// nuxt.config.ts
export default defineNuxtConfig({
  // ...
  modules: ['nuxt3-breakpoints'],
  /// OR
  modules: [
    ['nuxt3-breakpoints', {
      sm: 576,
      md: 768,
      lg: 992,
      xl: 1200,
      options: {
        throttle: 200,
      }
    }]
  ],
  // ...
  //also you configure it with module key
  'nuxt3-breakpoints': {
    sm: 576,
    md: 768,
    lg: 992,
    xl: 1200,
    options: {
      throttle: 200,
    }
  },
})

Please use one module configure way

Module default options

Options represented before are default

Module default options

Options represented before are default

Usage

const bp = useBreakpoints()

const isSmallThanMd = computed(() => bp.value.sMd)

<template>
  <div v-if="isSmallThanMd">
    Block enabled on resolutions smaller than Md
  </div>
</template>

Composable return ref value with next params

const bp = {
  current: 'xs',

  xs: true,

  sm: false,
  lSm: false,
  sSm: true,

  md: false,
  lMd: false,
  sMd: true,

  lg: false,
  lLg: false,
  sLg: true,

  xl: false,

  width: 0,
  height: 0
}

©️ LICENSE

MIT

FAQs

Package last updated on 22 Jun 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts