0.0.2 • Published 1 year ago
tailwind-helpers-vue v0.0.2
tailwind-helpers-vue
Helper Vue.js functions for TailwindCSS
Installation
npm install tailwind-helpers-vue
Functions
useBreakpoint
Determine the active device breakpoint using Tailwind labels.
import { useBreakpoint } from 'tailwind-helpers-vue';
const menuIsOpen = ref(true);
const isDesktop = useBreakpoint('sm'); // md, lg, xl, 2xl
watch(
isDesktop,
() => {
menuIsOpen.value = isDesktop.value;
},
{ immediate: true }
);