All Projects → geckse → ionic-truncated-slider-cards

geckse / ionic-truncated-slider-cards

Licence: MIT license
Customized slider component to achieve a fancy horizontal truncated slider, basically for short list of cards

Programming Languages

typescript
32286 projects
HTML
75241 projects
CSS
56736 projects
javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to ionic-truncated-slider-cards

ionic-signature-pad
Ionic plugin to input singnature pad
Stars: ✭ 15 (-21.05%)
Mutual labels:  ionic, ionic4
Ionic3 Angular43 Httpclient
Example of Ionic 3 and the new Angular 4.3 HTTPClient
Stars: ✭ 20 (+5.26%)
Mutual labels:  ionic, example
ngx-ionic-image-viewer
An Ionic 4 Angular component to view & zoom on images and photos without any additional dependencies.
Stars: ✭ 129 (+578.95%)
Mutual labels:  ionic, ionic4
example-cordova-code-push-plugin
Ionic + Cordova Code Push Plugin Example
Stars: ✭ 45 (+136.84%)
Mutual labels:  ionic, ionic4
app-starter
Angular mono-repo (Ionic/Capacitor/StencilJS/Web Component) app starter for supporting cross platform apps.
Stars: ✭ 75 (+294.74%)
Mutual labels:  ionic, ionic4
ionic-audio-player
A simple audio player created with Ionic 4+ / Angular 8+ (updated in Aug 2019)
Stars: ✭ 72 (+278.95%)
Mutual labels:  ionic, ionic4
Ionic3 Chat
ionic3 chat example
Stars: ✭ 465 (+2347.37%)
Mutual labels:  ionic, example
ionic-modal-custom-transitions
Add Custom Transitions to Ionic Modals.
Stars: ✭ 22 (+15.79%)
Mutual labels:  ionic, ionic4
ionic4-angular7-httpinterceptor-example
Ionic 4 and Angular 7 Tutorial: HTTP Interceptor Example
Stars: ✭ 15 (-21.05%)
Mutual labels:  ionic, ionic4
ionic4-image-crop-upload
Ionic 4, Angular 7 and Cordova Crop and Upload Image
Stars: ✭ 16 (-15.79%)
Mutual labels:  ionic, ionic4
ionic4-ngrx-firebase
A basic application for Ionic 4 with firebase & ngrx actions, reducers and effects
Stars: ✭ 17 (-10.53%)
Mutual labels:  ionic, ionic4
ionic4-boilerplate
🚀 boilerplate for ionic4 with CI based on travis and fastlane. doc and example are provided
Stars: ✭ 25 (+31.58%)
Mutual labels:  ionic, ionic4
ionic-uber-clone
Ionic 4 Taxi Booking script
Stars: ✭ 34 (+78.95%)
Mutual labels:  ionic, ionic4
angular-progress-bar
This component allow you to easy incorporate progress-bar to angular/ionic project, providing binding and color options
Stars: ✭ 26 (+36.84%)
Mutual labels:  ionic, ionic4
ngx-ion-simple-mask
Input mask for Angular/Ionic
Stars: ✭ 21 (+10.53%)
Mutual labels:  ionic, ionic4
ionic4-angular7-example
Ionic 4, Angular 7 and Cordova Tutorial: Build CRUD Mobile Apps
Stars: ✭ 57 (+200%)
Mutual labels:  ionic, ionic4
ionic4-angular8-crud-mobileapps-example
Ionic 4 Angular 8 Tutorial: Learn to Build CRUD Mobile Apps
Stars: ✭ 20 (+5.26%)
Mutual labels:  ionic, ionic4
HTML-Crypto-Currency-Chart-Snippets
💹 Simple HTML Snippets to create Tickers / Charts of Cryptocurrencies with the TradingView API 💹
Stars: ✭ 89 (+368.42%)
Mutual labels:  example
dynamic-home-example-flutter
How to use dynamic home page in Flutter?
Stars: ✭ 21 (+10.53%)
Mutual labels:  example
SplashScreenExample
How to implement a Splash Screen in ReactNative
Stars: ✭ 14 (-26.32%)
Mutual labels:  example

Ionic 4 Slider (component) for a Truncated Horizontal Slider

I wanted to create something like you can see in the App-Screen below. Somehow horizontal slider with cards became quite popular and are yet easy to create with Ionic. (Even more easy in Ionic 4). We don't even need a new component, though.

UI-Example by UISTAR

UI-Example / App-Screenshot Source: http://instagram.com/p/BWf8VYDgTfZ by UISTAR. Great Design. Just what we want. 🙌

So that's the goal. So where is the hack?

In your Template:

<!-- usage of ion-slide and ion-card -->
<!-- customize swipe slider options in your component typescript -->
<ion-slides [options]="slideOpts">
  <ion-slide>
    <ion-card class="ion-text-start">
      ...
    </ion-card>
  </ion-slide>
</ion-slides>

And in your Components code:

@Component({
...
})
export class YourComponent {
  /*
    spaceBetween: 0 <- Spacing is made trough ion-cards margin
    slidesPerView: 1.15 <- Amount of visible Slides, or in our example: Cards
  */
  slideOpts: {
    spaceBetween: 0,
    slidesPerView: 1.15,  
  };

  constructor(){
  }
}

Basically done. Ofc with some more adjustments you'll receive a more fabulous result, but just using Ionic 4 default components styling your card slider already looks awesome.

With default Ionic 4 Stylings you should receive something like this: Ionic 4 iOS Resul

Testing the Example:

cd where-ever-your-git-lives/ionic-truncated-slider-cards/
npm install
ionic serve --platform ios -c

Looking for an Ionic 3 solution?

https://github.com/geckse/ionic-truncated-slider-cards/tree/ionic-3

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].