This package has been deprecated

Author message:

package moved to scope @teamnovu/nuxt-breaky

nuxt-breaky

1.1.2 • Public • Published

nuxt-breaky

npm version License

Show Tailwind CSS Breakpoints in Nuxtjs

Intro

DEMO

breaky helps you to develop your responsive designs faster. It reads your defined breakpoints within your Tailwind Config and shows the current active breakpoint based on your browser window width.

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

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

Setup

  1. Add nuxt-breaky as a dev-dependency to your project
yarn add --dev nuxt-breaky # or npm install --save-dev nuxt-breaky
  1. Add nuxt-breaky to the buildModules section of nuxt.config.js

Use the modules section if you are using Nuxt older than v2.9. More Info

{
  buildModules: [
    // Simple usage
    'nuxt-breaky',

    // With options
    [
      'nuxt-breaky',
      {
        enabled: true,
        enableInProd: false,
        colorScheme: 'auto',
        position: 'bottomRight'
      }
    ]
  ]
}
  1. Add exposeConfig: true to the tailwindcss section of nuxt.config.js
{
  tailwindcss: {
    exposeConfig: true
  }
}

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 both the module options and the Nuxt config way.

{
  buildModules: {
    ['nuxt-breaky', { /* module options */ }]
  },

  breaky: {
    /* module 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)
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:patch (minor or major)
  2. npm publish

License

MIT License

Copyright (c) teamnovu

Readme

Keywords

none

Package Sidebar

Install

npm i nuxt-breaky

Weekly Downloads

1

Version

1.1.2

License

MIT

Unpacked Size

24.3 kB

Total Files

10

Last publish

Collaborators

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