Gathering detailed insights and metrics for ngx-responsive
Gathering detailed insights and metrics for ngx-responsive
Gathering detailed insights and metrics for ngx-responsive
Gathering detailed insights and metrics for ngx-responsive
ngx-owl-carousel-o
Angular powered owl-carousel
ngx-gallery
Responsive Angular 2 / 4 image gallery plugin
@squidit/ngx-css
Squid CSS Styleguide for Angular
ngx-responsive-datatable
Responsive datatable. Easy implementation, beautiful and clean style, powerful search engine and pagination that can handle large data. It was created with Angular16, but it surely works on Angular 8+.
Superset of RESPONSIVE DIRECTIVES to show or hide items according to the size of the device screen and another features in Angular 9
npm install ngx-responsive
Typescript
Module System
Node Version
NPM Version
New method and observable to responsive-window component
Updated on Feb 11, 2020
Updated to Angular 7.
Updated on Dec 09, 2018
Angular 6 Support
Updated on May 05, 2018
New Reactive Services and other features.
Updated on Apr 01, 2018
fix ng-package error
Updated on Mar 04, 2018
Updated library to Angular 5
Updated on Nov 15, 2017
TypeScript (100%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
MIT License
294 Stars
231 Commits
72 Forks
17 Watchers
14 Branches
16 Contributors
Updated on Jun 29, 2025
Latest Version
9.0.3
Package Id
ngx-responsive@9.0.3
Unpacked Size
2.60 MB
Size
410.97 kB
File Count
280
NPM Version
6.10.2
Node Version
12.8.1
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
3
Superset of RESPONSIVE DIRECTIVES to show or hide items according to the size of the device screen and another features in Angular 9.
npm i ngx-responsive --save
npm i ngx-responsive@8.2.0 --save
npm i ngx-responsive@7.0.1 --save
npm i ngx-responsive@6.0.0 --save
npm i ngx-responsive@5.0.8 --save
npm i ng2-responsive --save
RESPONSIVE_DIRECTIVES
provides the following features:
installing the package via npm
npm i ngx-responsive --save
bootstrap the service
import { NgModule } from '@angular/core'
import { ResponsiveModule } from 'ngx-responsive'
...
@NgModule({
imports: [
ResponsiveModule.forRoot()
],
declarations: [
AppComponent
],
providers:[]
})
export class AppModule { }
import { NgModule } from '@angular/core'
import { ResponsiveModule } from 'ngx-responsive'
...
const config = {
breakPoints: {
xs: {max: 600},
sm: {min: 601, max: 959},
md: {min: 960, max: 1279},
lg: {min: 1280, max: 1919},
xl: {min: 1920}
},
debounceTime: 100
};
...
@NgModule({
imports: [
BrowserModule,
ResponsiveModule.forRoot(config)
],
declarations: [
AppComponent
],
providers:[]
})
export class AppModule { }
3.DIRECTIVES:
* In your component to import the RESPONSIVE_DIRECTIVES only need import:
```
@Component({
selector: 'my-component',
template: '
<p *showItStandard="['iphone','ipad']">I'll show you if I'm a iPhone or ipad device.</p>
<p *isIphone>I'll show you if I'm a iPhone device.</p>
<p *isChrome>I'll show you if I'm a chrome browser.</p>
<p *xl>I'll show you if I'm a xl screen size.</p>
<p *lg>I'll show you if I'm a lg screen size.</p>
<p *md>I'll show you if I'm a md screen size.</p>
<p *sm>I'll show you if I'm a sm screen size.</p>
<p *xs>I'll show you if I'm a xs screen size.</p>
'
})
```
ALL RESPONSIVE DIRECTIVES OPTIONS
Responsive Window directive: Capture the size of the parent element to show or hide fill elements. If the parent responsive size is x show or hide.
First syntax
Define a named parrent element, the reference is stored on the service and available outside of the current container. Name must be unique to avoid conflicts
<div [responsive-window]="'parent'">
<p *responsive="{ sizes:{ window: 'parent', min:900, max:1400} }"></p>
</div>
Second syntax
Define a reference to the parent element
<div responsive-window #myContainerRef="container">
<p *responsive="{ sizes: { min:900, max:1400 } } ; container:myContainerRef">...</p>
</div>
Or:
<div responsive-window #myContainerRef="container">
<ng-template [responsive]="{ sizes:{ min:900, max:1400 } }" [responsiveContainer]="myContainerRef">
<p>....</p>
</ng-template>
</div>
New Detection of multiple functions at once.
All combinations = *responsive="{
bootstrap: ['xl','lg','md','sm','xs'],
browser: ['chrome','firefox','ie','safari', 'opera'],
ie:['ie 9','ie 10','ie 11','ie +12'],
pixelratio:['1x','retina','4k'],
standard:['iphone','ipad','android mobile','android tablet','windows phone'],
orientation:['landscape','portrait'],
device: ['mobile','tablet','smarttv','desktop'],
sizes:{min:900,max:1400}
}"
*Example in component
@Component({
selector: 'my-component',
template: '
<p *responsive="{
bootstrap: 'lg',
browser: ['chrome','firefox'],
pixelratio:'1x',
orientation:'landscape',
device: 'desktop',
sizes:{min:900,max:1400}
}">I'll show you if all the options are true.</p>
<template [responsive]="{
bootstrap: 'lg',
browser: ['chrome','firefox'],
pixelratio:'1x',
orientation:'landscape',
device: 'desktop',
sizes:{min:900,max:1400}
}" (changes)="miMethod($event)">I'll show you if all the options are true & listen events changes.</template>
'
})
One function detect
@Component({
selector: 'my-component',
template: '
<p *xl>I'll show you if I'm a xl screen size.</p>
<p *lg>I'll show you if I'm a lg screen size.</p>
<p *md>I'll show you if I'm a md screen size.</p>
<p *sm>I'll show you if I'm a sm screen size.</p>
<p *xs>I'll show you if I'm a xs screen size.</p>
'
})
With multiple combinations of bootstrap screen sizes and show / hide options
@Component({
selector: 'my-component',
template: '
<p *showItBootstrap="['md','xs']">I'll show you only in md and xs screen sizes.</p>
<p *hideItBootstrap="['lg','sm']">I'll hide you only in lg and sm screen sizes.</p>'
})
@Component({
selector: 'my-component',
template: '
<p *isSmartTv>I'll show you if I'm a smartTv device.</p>
<p *isDesktop>I'll show you if I'm a desktop device.</p>
<p *isTablet>I'll show you if I'm a tablet device.</p>
<p *isMobile>I'll show you if I'm a mobile device.</p>
'
})
@Component({
selector: 'my-component',
template: '
<p *showItDevice="['mobile','tablet']">I'll show you if I'm a tablet or a mobile device.</p>
<p *hideItDevice="['mobile','tablet','desktop']">I'll hide you if I'm a desktop / tablet or mobile device.</p>'
})
@Component({
selector: 'my-component',
template: '
<p *isIphone>I'll show you if I'm a iPhone device.</p>
<p *isIpad>I'll show you if I'm a iPad device.</p>
<p *isAndroidMobile>I'll show you if I'm a android mobile device.</p>
<p *isAndroidTablet>I'll show you if I'm a android tablet device.</p>
<p *isWindowsPhone>I'll show you if I'm a windows phone mobile device.</p>'
})
@Component({
selector: 'my-component',
template: '
<p *showItStandard="['android mobile','windows phone']">I'll show you if I'm a android mobile or a windows phone device.</p>
<p *hideItStandard="['iphone','ipad']">I'll hide you if I'm a iPad or a iPhone device.</p>'
})
@Component({
selector: 'my-component',
template: '
<p *isPortrait>I'll show you if I'm a portrait state.</p>
<p *isLandscape>I'll show you if I'm a landscape state.</p>
'
})
@Component({
selector: 'my-component',
template: '
<p *showItSizes="{min:955,max:1057}">I'll show you if responsive-window width is between the min and max.</p>
<p *showItSizes="{min:750}">I'll show you if responsive-window width is greater than or equal to min.</p>
<p *hideItSizes="{min:360,max:768}">It is hidden if responsive-window width between the min and max.</p>
'
})
responsive-window being window by default or any element set using the Responsive Window directive.
@Component({
selector: 'my-component',
template: '
<p *isChrome>I'll show you if I'm a Chrome Browser.</p>
<p *isFirefox>I'll show you if I'm a Firefox Browser.</p>
<p *isSafari>I'll show you if I'm a Safari Browser.</p>
<p *isOpera>I'll show you if I'm a Opera Browser.</p>
<p *isIE>I'll show you if I'm a Internet Explorer Browser.</p>
'
})
@Component({
selector: 'my-component',
template: '
<p *showItBrowser="['ie','opera']">I'll show you if I'm a IE or Opera Browser.</p>
<p *hideItBrowser="['chrome','firefox','safari']">I'll hide you if I'm a Chrome, Firefox or Safari Browser.</p>'
})
@Component({
selector: 'my-component',
template: '
<p *isIE9>I'll show you if I'm a Internet Explorer 9.</p>
<p *isIE10>I'll show you if I'm a Internet Explorer 10.</p>
<p *isIE11>I'll show you if I'm a Internet Explorer 11.</p>
<p *isIE12>I'll show you if I'm a Internet Explorer 12.</p>'
})
@Component({
selector: 'my-component',
template: '
<p *showIEVersion="['ie 11','ie +12']">I'll show you if I'm a IE 11 browser or IE 12</p>
<p *hideIEVersion="['ie 9','ie 10']">I'll hide you if I'm IE 9 browser or IE 10.</p>
'
})
Get the userAgent info directive:
<user-agent-info (info)="thisUserAgent($event)"></user-agent-info>
FORMAT OF USER AGENT INFO OBJECT
Description of the object given by the (info)
event of the directive user-agent-info
(usage: <user-agent-info (info)="thisUserAgent($event)"></user-agent-info>
).
{
device: 'mobile' | 'tablet' | 'smarttv' | 'desktop',
browser: 'chrome' | 'firefox' | 'ie' | 'safari' | 'opera' | 'silk' | 'yandex' | 'NA',
pixelratio: '4k' | 'retina' | '1x',
ie_version: {
name: 'ie 7' | 'ie 8' | 'ie 9' | 'ie 10' | 'ie 11' | 'ie +12',
state: true | false
},
game_device: {
name: 'Playstation 4' | 'Playstation 3' | 'Xbox one' | 'Xbox' | 'Wii' | 'Wii U' | 'Nintendo 3DS' | 'Playstation Vita' | 'PSP'
state: true | false
},
smart_tv: {
name: 'Chromecast' | 'Apple tv' | 'Google tv' | 'Xbox One' | 'Playstation 4' | 'Generic smartv'
state: true | false
},
desktop: {
name: 'Windows' | 'Mac' | 'Linux',
state: true | false
},
tablet: {
name: 'Ipad' | 'Android' | 'Kindle' | 'Generic Tablet',
state: true | false
},
mobile: {
name: 'Iphone' | 'Android' | 'Windows Phone' | 'Blackberry' | 'Generic Mobile'
state: true | false
},
window_os: {
name: 'Windows XP' | 'Windows Vista' | 'Windows 7' | 'Windows 8' | 'Windows 10' | 'Generic Windows'
state: true | false
},
linux_os: {
name: 'Debian' | 'Knoppix' | 'Mint' | 'Ubuntu' | 'Kubuntu' | 'Xubuntu' | 'Lubuntu' | 'Fedora' | 'Red hat' | 'Mandriva' | 'Gentoo' | 'Sabayon' | 'Slackware' | 'Suse' | 'CentOS' | 'Backtrack' | 'Generic Linux',
state: true | false
},
bot: true | false
}
<h1 *responsive-css="{
bootstrap: {xl: "micssclassxl", lg:"micssclasslg"},
orientation:{landscape:"micssclasslandscape"}
}"></h1>
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
0 existing vulnerabilities detected
Reason
license file detected
Details
Reason
Found 9/19 approved changesets -- score normalized to 4
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Score
Last Scanned on 2025-07-07
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More