Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
@magloft/material-carousel
Advanced tools
Carousel component for Angular using Material Design.
This is a fork of gbrlsnchs/material2-carousel and has been upgraded for use with Angular 14. All credits go to gbrlsnchs and gabrielbusarello for their great work on creating and maintaining this component, and I have merely updated the repository to work with Angular 14.
This package is a carousel component for Angular using Material Design.
yarn add @magloft/material-carousel
//...
import { MatCarouselModule } from '@magloft/material-carousel';
@NgModule({
// ...
imports: [
// ...
MatCarouselModule.forRoot(),
// ...
]
})
export class AppModule {}
MatCarouselComponent
import { MatCarousel, MatCarouselComponent } from '@magloft/material-carousel';
<mat-carousel>
...
</mat-carousel>
Input | Type | Description | Default value |
---|---|---|---|
timings | string | Timings for slide animation. | '250ms ease-in' |
autoplay | boolean | Enable automatic sliding. | true |
interval | number | Autoplay's interval in milliseconds. | 5000 |
loop | boolean | Enable loop through arrows. | true |
hideArrows | boolean | Hide navigation arrows. | true |
hideIndicators | boolean | Hide navigation indicators. | true |
color | ThemePalette | Color palette from Material. | 'accent' |
maxWidth | string | Maximum width. | 'auto' |
maintainAspectRatio | boolean | If true, use proportion to determine height, else slideHeight is used. | true |
proportion | number | Height proportion compared to width. | 25 |
slideHeight | string | Explicit slide height. Used when maintainAspectRatio is false. | '100%' |
slides | number | Maximum amount of displayed slides. | |
useKeyboard | boolean | Enable keyboard navigation. | false |
useMouseWheel | boolean | Enable navigation through mouse wheeling. | false |
orientation | Orientation | Orientation of the sliding panel. | 'ltr' |
svgIconOverrides | SvgIconOverrides | Override default carousel icons with registered SVG icons. | |
pauseOnHover | boolean | Override default pause on hover. | true |
Output | Type | Description |
---|---|---|
animationStart | number | It emits the currentIndex when animation starts |
change | number | It emtis the currentIndex when animation ends |
By default, maintainAspectRatio
is true, which means height is controlled through proportion
.
If you want to have a carousel with constant height (regardless of width), you must set maintainAspectRatio
to false.
By default, slideHeight
is set to 100%
, which will not work if the parent element height isn't defined (i.e. relative heights do not work if the parent height is auto
). In that case you could pass a valid css string for slideHeight
. You can use any valid css height string like 100px
or 25vh
.
Play around with the docs to see how you can use this carousel with or without explicit parent height.
With parent elements that have height:auto
proportion
if you want a carousel that resizes responsively (this is the default configuration).maintainAspectRatio="false"
and a non-percentage slideHeight
if you want a fixed height carousel.slideHeight
; the carousel will not render.With parent elements that have a set height
maintainAspectRatio="false"
if you want a fixed height carousel that fills the parent element (slideHeight
is 100%
by default).maintainAspectRatio="false"
and slideHeight
(unless slideHeight="100%"
); the carousel will not render correctly because the buttons and indicators will be positioned with respect to the parent.proportion
; this will lead to gaps or unwanted overflow.MatCarouselSlideComponent
import { MatCarouselSlide, MatCarouselSlideComponent } from '@magloft/material-carousel';
<mat-carousel>
<mat-carousel-slide>
...
</mat-carousel-slide>
</mat-carousel>
Input | Type | Description | Default value |
---|---|---|---|
image | string | Image displayed in the slide. | |
overlayColor | string | Color of the slide's overlay. | '#00000040' |
hideOverlay | boolean | Toggle overlay on/off. | false |
disabled | boolean | Skip slide when navigating. | false |
ng test carousel --watch false
ng serve docs --source-map
[16.2.0] - 2023-10-14
FAQs
Carousel component for Angular using Material Design.
The npm package @magloft/material-carousel receives a total of 594 weekly downloads. As such, @magloft/material-carousel popularity was classified as not popular.
We found that @magloft/material-carousel demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.