# nuxt-bulma-breakpoints

> Resize observer breakpoints with Nuxt.js module. Bulma edition

Latest version **1.0.2** (published 2020-07-17) · MIT license · 0 weekly downloads

## Install

```sh
npm install nuxt-bulma-breakpoints
pnpm add nuxt-bulma-breakpoints
yarn add nuxt-bulma-breakpoints
bun add nuxt-bulma-breakpoints
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.2 |
| Published | 2020-07-17 |
| First published | 2020-07-13 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 9.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Maintainers | rosendito |
| Keywords | nuxtjs, resizeobserver, breakpoint, resize, mediaquery, responsive, bulma |

## Links

- npm: https://www.npmjs.com/package/nuxt-bulma-breakpoints
- Repository: https://github.com/Rosendito/nuxt-bulma-breakpoints
- Homepage: https://github.com/Rosendito/nuxt-bulma-breakpoints#readme
- Issues: https://github.com/Rosendito/nuxt-bulma-breakpoints/issues
- npm.io page: https://npm.io/package/nuxt-bulma-breakpoints

## Dependencies (2)

- [lodash](https://npm.io/package/lodash.md) ^4.17.15
- [resize-observer-polyfill](https://npm.io/package/resize-observer-polyfill.md) ^1.5.1

## Alternatives

- [@sveltejs/kit](https://npm.io/package/@sveltejs/kit.md) — 2.2M weekly downloads
- [@atlaskit/theme](https://npm.io/package/@atlaskit/theme.md) — 402.0K weekly downloads
- [@tangle-network/brand](https://npm.io/package/@tangle-network/brand.md) — 10.0K weekly downloads
- [seneca](https://npm.io/package/seneca.md) — 7.4K weekly downloads
- [@bsb/base](https://npm.io/package/@bsb/base.md) — 7.2K weekly downloads

## Recent versions

- 1.0.2 (latest) — 2020-07-17
- 1.0.1 — 2020-07-16
- 1.0.0 — 2020-07-13

## README

# nuxt-bulma-breakpoints

> Resize observer breakpoints with Nuxt.js module. Bulma edition

## Setup

1. Add `nuxt-bulma-breakpoints` dependency to your project

```bash
yarn add nuxt-bulma-breakpoints # or npm install nuxt-breakpoints
```

2. Add `nuxt-bulma-breakpoints` to the `modules` section of `nuxt.config.js`

```js
{
  modules: [
    // Simple usage
    'nuxt-breakpoints',

    // With options
    ['nuxt-breakpoints', { /* module options */ }]
  ]

  // Another way to use options
  breakpoints: {
    // default options
    tablet: 769,
    desktop: 1024,
    widescreen: 1216,
    fullhd: 1408,
    options: {
      polyfill: true,
      throttle: 200
    }
  }
}
```
## Usage
```js
// components.vue
export default {
  computed: {
    isMobile() {
      return this.$breakpoints.mobile
    },
    untilWidescreen(){
      return this.$breakpoints.untilWidescreen
    }
    current() {
      return this.$breakpoints.current
    }
  }
}
```

## Breakpoints and helpers

| Helper          | Note                                                     |
|-----------------|----------------------------------------------------------|
| mobile          | width < 769px (tablet)                                   |
| tablet          | width >= 769px (tablet)                                  |
| tabletOnly      | width >= 769px (tablet) && width < 1024 (desktop)        |
| touch           | width < 1024px (desktop)                                 |
| desktop         | width >= 1024px (desktop)                                |
| desktopOnly     | width >= 1024px (desktop) && width < 1216px (widescreen) |
| untilWidescreen | width < 1216px (widescreen)                              |
| widescreen      | width >= 1216px (widescreen)                             |
| widescreenOnly  | width >= 1216px (widescreen) && width < 1408px (fullhd)  |
| untilFullhd     | width < 1408px (fullhd)                                  |
| fullhd          | width >= 1408px (fullhd)                                 |

## Options

| Property   | Type   | Default                           |
|------------|--------|-----------------------------------|
| mobile     | none   | none                              |
| tablet     | number | 769                               |
| desktop    | number | 1024                              |
| widescreen | number | 1216                              |
| fullhd     | number | 1408                              |
| options    | object | { polyfill: true, throttle: 200 } |

**Note**: `polyfill` default by true, which means auto-import `resize-observer-polyfill` when the browser doesn't support ResizeObserver more information below, `throttle` will slow down when Window has resizing trigger speed.

## Development

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

## Ref
[Nuxt.js](https://nuxtjs.org)

[MDN - ResizeObserver](https://developer.mozilla.org/en-US/docs/Web/API/ResizeObserver)

[ResizeObserver Polyfill](https://github.com/que-etc/resize-observer-polyfill)

## License

[MIT License](./LICENSE)

Copyright (c) Steven Ho <shockshocksoul@gmail.com>

---
_Source: https://npm.io/package/nuxt-bulma-breakpoints · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
