All Projects → gbrlsnchs → Material2 Carousel

gbrlsnchs / Material2 Carousel

Licence: mit
A carousel component for Angular using Material

Programming Languages

typescript
32286 projects

Projects that are alternatives of or similar to Material2 Carousel

nglp-angular-material-landing-page
NGLP is an Angular Material Landing Page.
Stars: ✭ 32 (-61.9%)
Mutual labels:  angular-material, carousel
Material Storybook
Material Demos using Storybook
Stars: ✭ 72 (-14.29%)
Mutual labels:  material, angular-material
Angular5 Example Shopping App
Angular 5 Example Shopping App + Angular Material + Responsive
Stars: ✭ 120 (+42.86%)
Mutual labels:  material, angular-material
Ajsf
Angular JSON Schema Form
Stars: ✭ 266 (+216.67%)
Mutual labels:  material, angular-material
Covalent
Teradata UI Platform built on Angular Material
Stars: ✭ 2,230 (+2554.76%)
Mutual labels:  material, angular-material
Material Auto Rotating Carousel
Introduce users to your app with this Material-style carousel.
Stars: ✭ 400 (+376.19%)
Mutual labels:  material, carousel
React Native Snap Carousel
Swiper/carousel component for React Native featuring previews, multiple layouts, parallax images, performant handling of huge numbers of items, and more. Compatible with Android & iOS.
Stars: ✭ 9,151 (+10794.05%)
Mutual labels:  carousel
Schematics Utilities
🛠️ Useful exported utilities for working with Schematics
Stars: ✭ 73 (-13.1%)
Mutual labels:  material
Muse Ui
Material Design UI library for Vuejs 2.0
Stars: ✭ 8,302 (+9783.33%)
Mutual labels:  material
Flutter Music Player
Flutter Music Player - First Open Source Flutter based material design music player with audio plugin to play local music files.
Stars: ✭ 1,215 (+1346.43%)
Mutual labels:  material
Calendarview2
Calendar view for Android. Pretty.
Stars: ✭ 72 (-14.29%)
Mutual labels:  material
Ng Dynamic Forms
Rapid form development library for Angular
Stars: ✭ 1,146 (+1264.29%)
Mutual labels:  material
Segmentedarcview
Unique & beautiful segmented arc view with rich customisation options! RTL supported.
Stars: ✭ 67 (-20.24%)
Mutual labels:  material
Django Admin Material
A Django Admin interface based on Material Design by Google
Stars: ✭ 74 (-11.9%)
Mutual labels:  material
Onsenui
Mobile app development framework and SDK using HTML5 and JavaScript. Create beautiful and performant cross-platform mobile apps. Based on Web Components, and provides bindings for Angular 1, 2, React and Vue.js.
Stars: ✭ 8,518 (+10040.48%)
Mutual labels:  material
Vue Mdc
Material web components for Vue.js
Stars: ✭ 1,217 (+1348.81%)
Mutual labels:  material
Materialviewpager
A Material Design ViewPager easy to use library
Stars: ✭ 8,224 (+9690.48%)
Mutual labels:  material
Vue Agile
🎠 A carousel component for Vue.js
Stars: ✭ 1,167 (+1289.29%)
Mutual labels:  carousel
Nhentai Nhviewer
(NSFW) NHViewer is a simple third-party nhentai client for Android
Stars: ✭ 76 (-9.52%)
Mutual labels:  material
React Native Carousel View
react-native carousel, support in both Android and iOS
Stars: ✭ 70 (-16.67%)
Mutual labels:  carousel

Material Carousel

Build Status npm version Live demo

NOTICE

I no longer use Angular. By not using Angular anymore, it means I no longer use this component, what prevents me from pushing quality commits, doing assertive code reviews and being up-to-date with new Angular releases. I don't do open source for stars, I do to help people, so I don't want people that depend on this component to have a bad support.

That said, for the sake of the community, I suggest you to use this fork instead (thanks gabrielbusarello!). There are a bunch of small issues to be solved and also some major ones but I'm sure someone actively using Angular will handle them with ease.

Thanks for the support and take care!

About

This package is a carousel component for Angular using Material Design.

Until v1 is reached, breaking changes may be introduced.

Installing

npm install --save @ngmodule/material-carousel

Importing

//...
import { MatCarouselModule } from '@ngmodule/material-carousel';

@NgModule({
  // ...
  imports: [
    // ...
    MatCarouselModule.forRoot(),
    // ...
  ]
})
export class AppModule {}

Usage

MatCarouselComponent

import { MatCarousel, MatCarouselComponent } from '@ngmodule/material-carousel';
<mat-carousel>
  ...
</mat-carousel>

Attributes

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. false
hideIndicators boolean Hide navigation indicators. false
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. true
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.

Size Considerations and Recommendations

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 demo to see how you can use this carousel with or without explicit parent height.

With parent elements that have height:auto

  • use proportion if you want a carousel that resizes responsively (this is the default configuration).
  • use maintainAspectRatio="false" and a non-percentage slideHeight if you want a fixed height carousel.
  • DO NOT use relative (%) values for slideHeight; the carousel will not render.

With parent elements that have a set height

  • use maintainAspectRatio="false" if you want a fixed height carousel that fills the parent element (slideHeight is 100% by default).
  • DO NOT use 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.
  • DO NOT use proportion; this will lead to gaps or unwanted overflow.

MatCarouselSlideComponent

import { MatCarouselSlide, MatCarouselSlideComponent } from '@ngmodule/material-carousel';
<mat-carousel>
  <mat-carousel-slide>
    ...
  </mat-carousel-slide>
</mat-carousel>

Attributes

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

Contributing

How to help

How to develop and test

Testing

ng test carousel --watch false

Running the demo application

ng serve demo --source-map

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].