This package has been deprecated

Author message:

Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

@teamnovu/vue-breaky

0.1.3 • Public • Published

vue-breaky

npm version License

Show Tailwind CSS Breakpoints in Vuejs when using the tailwindcss

📖 Release Notes

Intro

DEMO

breaky helps you create your responsive designs faster. It extends the awesome tailwindcss. breaky reads your defined breakpoints within your tailwind config and shows the currently active breakpoint based on your browser window width.

The plugin will only be loaded during development mode and does not interfere with your production build.

Demo GIF of window resizing Demo GIF of dragging Demo GIF of toggling dark mode

Requirements

Make sure tailwindcss is installed.

Setup

  1. Add @teamnovu/vue-breaky as a dev-dependency to your project
yarn add @teamnovu/vue-breaky --dev

# or npm install @teamnovu/vue-breaky --save-dev
  1. Add the following code to your main.js
import resolveConfig from 'tailwindcss/resolveConfig' // used to merge tailwindcss default config with your custom config
import Breaky from '@teamnovu/vue-breaky/lib/plugin-vue'

Vue.use(Breaky, {
  tailwindConfig: resolveConfig(require('./tailwind.config')), // Required

  // Additional options
  enabled: true,
  enableInProd: process.env.DEPLOY_ENV === 'GH_PAGES',
  position: 'bottomRight',
  colorScheme: 'auto',
})

NOTE: Please be aware this adds ~19.5KB (~3.5KB) to the bundle size when you are in development mode.

Usage

The breaky module automatically adds the breaky plugin when in development mode. No need to register or include it anywhere else.

Configuration

You can pass options to the breaky using the Vue plugin options.

Vue.use(Breaky, {
  /* plugin options */
})

Available Options

Option Type Default Options Description
enabled Boolean true true | false Enable/Disable breaky
enableInProd Boolean false true | false Enable breaky in production (overrides the enabled option; Please be aware this adds ~19.5KB (~3.5KB) to the client bundle size. More Info)
colorScheme String auto 'auto' | 'light' | 'dark' Switch between different color schemes
position String 'bottomRight' 'topLeft' | 'topRight' | 'bottomLeft' | 'bottomRight' Breakys starting position

Development

  1. Clone this repository
  2. Install dependencies using yarn install
  3. Start development server using yarn dev

Release

  1. yarn release
  2. npm publish

License

MIT License

Copyright (c) teamnovu

Readme

Keywords

none

Package Sidebar

Install

npm i @teamnovu/vue-breaky

Weekly Downloads

5

Version

0.1.3

License

MIT

Unpacked Size

11.6 kB

Total Files

5

Last publish

Collaborators

  • timothyzemp
  • arcs-
  • kylewalow
  • okaufmann
  • reallykit
  • strebl