12.0.1 • Published 1 year ago

ngx-breakpoints v12.0.1

Weekly downloads
-
License
-
Repository
github
Last release
1 year ago

NgxBreakpoints

Breakpoint utilities

Installation

NgxBreakpoints requires @angular/cdk

npm install @angular/cdk
npm install ngx-breakpoints

Usage

import { NgxBreakpointConfig, NgxBreakpointsModule } from 'ngx-breakpoints';

const config: NgxBreakpointConfig = {
  breakpoints: {
    xs: '0',
    sm: '576px',
    md: '768px',
    lg: '992px',
    xl: '1200px',
    xxl: '1400px',
  },
  mobileBreakpoint: 'lg',
};

@NgModule({
  imports: [NgxBreakpointsModule.forRoot(config)],
})
export class AppModule {}
<div [desktopAttr]="[['id', '1']]">Desktop Attr</div>
<div desktopClass="one two">Desktop Class</div>
<div [desktopClass]="['one', 'two']">Desktop Class</div>
<div *desktopOnly>Desktop Only</div>
<div [mobileAttr]="[['id', '1']]">Mobile Attr</div>
<div mobileClass="one two">Mobile Class</div>
<div [mobileClass]="['one', 'two']">Mobile Class</div>
<div *mobileOnly>Mobile Only</div>
<div>
  <div desktopMaxWidth="420px" style="background-color: black; color: white;">Desktop Max Width</div>
</div>
<div *greaterOnly="'lg'"> Greater LG</div>
<div *lowerOnly="'lg'">Lower LG</div>
12.0.1

1 year ago

12.0.0

1 year ago

11.0.1

1 year ago

11.0.0

1 year ago

10.0.0

1 year ago

9.0.3

1 year ago

3.0.0

1 year ago

2.0.1

1 year ago

2.0.0

1 year ago

1.1.0

1 year ago

1.0.9

1 year ago

1.0.8

1 year ago

1.0.0

1 year ago