New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@teamnovu/vue-breaky-core

Package Overview
Dependencies
Maintainers
3
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@teamnovu/vue-breaky-core

Show Tailwind CSS Breakpoints in Vuejs

  • 0.1.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
10
decreased by-9.09%
Maintainers
3
Weekly downloads
 
Created
Source

nuxt-breaky

npm version License

Show Tailwind CSS Breakpoints in Nuxtjs when using the tailwindcss-module

Intro

DEMO

breaky helps you create your responsive designs faster. It extends the awesome tailwindcss-module. 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-module: ^1.4.0 (or higher) is installed.

Setup

Nuxt

  1. Add nuxt-breaky as a dev-dependency to your project
yarn add nuxt-breaky --dev

# or npm install nuxt-breaky --save-dev
  1. Add nuxt-breaky to the buildModules section of nuxt.config.js

NOTE: 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
  }
}

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

Vue

  1. Add nuxt-breaky as a dev-dependency to your project
yarn add nuxt-breaky --dev

# or npm install nuxt-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 'nuxt-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

Nuxt

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 */
  }
}
Vue
Vue.use(Breaky, {
  /* plugin options */
})
Available Options
OptionTypeDefaultOptionsDescription
enabledBooleantruetrue | falseEnable/Disable breaky
enableInProdBooleanfalsetrue | falseEnable breaky in production (overrides the enabled option; Please be aware this adds ~19.5KB (~3.5KB) to the client bundle size. More Info)
colorSchemeStringauto'auto' | 'light' | 'dark'Switch between different color schemes
positionString'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

FAQs

Package last updated on 24 Mar 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc