nuxt-breakpoint
v1.0.0
Published
Nuxt Breakpoint Module
Downloads
13
Maintainers
Readme
Nuxt Breakpoint
🚀 Usage
npm i nuxt-breakpoint
//nuxt.config.js
modules: [
['nuxt-breakpoint', {
//options
}]
]
This module is working on client side only. Variable $breakpoints is available everywhere, to make it reactive, you need to add it to the page/component data:
data() {
return {
breakpoints: this.$breakpoints
}
}
🔧 Options
- breakpoints
- debounce
Breakpoints
You can add any amount of breakpoints you want:
modules: [
['nuxt-breakpoint', {
breakpoints: {
// Default options
'mobile': '<=768',
'tablet': ['<=1024', '>768'],
'desktop': '>1024'
}
}]
]
Debounce
Number of miliseconds to debounce window 'resize' event (default: 100)