Nuxt Breakpoint
🚀 Usage
npm i nuxt-breakpoint
modules: [
['nuxt-breakpoint', {
}]
]
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
You can add any amount of breakpoints you want:
modules: [
['nuxt-breakpoint', {
breakpoints: {
'mobile': '<=768',
'tablet': ['<=1024', '>768'],
'desktop': '>1024'
}
}]
]
Debounce
Number of miliseconds to debounce window 'resize' event (default: 100)