{"id":16945131,"url":"https://github.com/abritopach/st-3d-card-carousel","last_synced_at":"2025-04-11T19:33:03.814Z","repository":{"id":57369112,"uuid":"191357041","full_name":"abritopach/st-3d-card-carousel","owner":"abritopach","description":"Sample project that shows an experimental 3D card carousel Web Component built with Stencil.","archived":false,"fork":false,"pushed_at":"2020-04-11T18:20:01.000Z","size":30294,"stargazers_count":6,"open_issues_count":3,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-01T20:31:36.315Z","etag":null,"topics":["stencil","stencil-components","stenciljs","stenciljs-components","web-components","webcomponents"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/abritopach.png","metadata":{"files":{"readme":"readme.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-06-11T11:22:40.000Z","updated_at":"2025-03-04T17:04:23.000Z","dependencies_parsed_at":"2022-09-26T16:41:14.548Z","dependency_job_id":null,"html_url":"https://github.com/abritopach/st-3d-card-carousel","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abritopach%2Fst-3d-card-carousel","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abritopach%2Fst-3d-card-carousel/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abritopach%2Fst-3d-card-carousel/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abritopach%2Fst-3d-card-carousel/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/abritopach","download_url":"https://codeload.github.com/abritopach/st-3d-card-carousel/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248467183,"owners_count":21108608,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["stencil","stencil-components","stenciljs","stenciljs-components","web-components","webcomponents"],"created_at":"2024-10-13T21:21:09.039Z","updated_at":"2025-04-11T19:33:03.789Z","avatar_url":"https://github.com/abritopach.png","language":"TypeScript","funding_links":["https://www.buymeacoffee.com/h6WVj4HcD"],"categories":[],"sub_categories":[],"readme":"![Built With Stencil](https://img.shields.io/badge/-Built%20With%20Stencil-16161d.svg?logo=data%3Aimage%2Fsvg%2Bxml%3Bbase64%2CPD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPCEtLSBHZW5lcmF0b3I6IEFkb2JlIElsbHVzdHJhdG9yIDE5LjIuMSwgU1ZHIEV4cG9ydCBQbHVnLUluIC4gU1ZHIFZlcnNpb246IDYuMDAgQnVpbGQgMCkgIC0tPgo8c3ZnIHZlcnNpb249IjEuMSIgaWQ9IkxheWVyXzEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4IgoJIHZpZXdCb3g9IjAgMCA1MTIgNTEyIiBzdHlsZT0iZW5hYmxlLWJhY2tncm91bmQ6bmV3IDAgMCA1MTIgNTEyOyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI%2BCjxzdHlsZSB0eXBlPSJ0ZXh0L2NzcyI%2BCgkuc3Qwe2ZpbGw6I0ZGRkZGRjt9Cjwvc3R5bGU%2BCjxwYXRoIGNsYXNzPSJzdDAiIGQ9Ik00MjQuNywzNzMuOWMwLDM3LjYtNTUuMSw2OC42LTkyLjcsNjguNkgxODAuNGMtMzcuOSwwLTkyLjctMzAuNy05Mi43LTY4LjZ2LTMuNmgzMzYuOVYzNzMuOXoiLz4KPHBhdGggY2xhc3M9InN0MCIgZD0iTTQyNC43LDI5Mi4xSDE4MC40Yy0zNy42LDAtOTIuNy0zMS05Mi43LTY4LjZ2LTMuNkgzMzJjMzcuNiwwLDkyLjcsMzEsOTIuNyw2OC42VjI5Mi4xeiIvPgo8cGF0aCBjbGFzcz0ic3QwIiBkPSJNNDI0LjcsMTQxLjdIODcuN3YtMy42YzAtMzcuNiw1NC44LTY4LjYsOTIuNy02OC42SDMzMmMzNy45LDAsOTIuNywzMC43LDkyLjcsNjguNlYxNDEuN3oiLz4KPC9zdmc%2BCg%3D%3D\u0026colorA=16161d\u0026style=flat-square)\n\n# Stencil 3D Card Carousel\n\n[![Ask me anything](https://img.shields.io/badge/ask%20me-anything-1abc9c.svg)](https://github.com/abritopach) [![Version](https://img.shields.io/npm/v/st-three-dimensional-card-carousel.svg)](https://www.npmjs.com/package/st-three-dimensional-card-carousel) [![Downloads](https://img.shields.io/npm/dt/st-three-dimensional-card-carousel.svg)](https://www.npmjs.com/package/st-three-dimensional-card-carousel)\n\n**If this project has been useful to you and you want to help me to keep contributing to the open source with projects, examples, plugins,... collaborate and buy me a coffee.**\n\n\u003ca href=\"https://www.buymeacoffee.com/h6WVj4HcD\" target=\"_blank\"\u003e\u003cimg src=\"https://www.buymeacoffee.com/assets/img/custom_images/yellow_img.png\" alt=\"Buy Me A Coffee\"\u003e\u003c/a\u003e\n\nSample project that shows an experimental 3D card carousel Web Component built with Stencil. A framework-agnostic web component that works in Ionic, Angular, React, Vue,...\n\nStencil is also great for building entire apps. For that, use the [stencil-app-starter](https://github.com/ionic-team/stencil-app-starter) instead.\n\n# Stencil\n\nStencil is a compiler for building fast web apps using Web Components.\n\nStencil combines the best concepts of the most popular frontend frameworks into a compile-time rather than run-time tool.  Stencil takes TypeScript, JSX, a tiny virtual DOM layer, efficient one-way data binding, an asynchronous rendering pipeline (similar to React Fiber), and lazy-loading out of the box, and generates 100% standards-based Web Components that run in any browser supporting the Custom Elements v1 spec.\n\nStencil components are just Web Components, so they work in any major framework or with no framework at all.\n\n## Component preview\n\n![Component](readme_resources/component_preview.gif \"Component\")\n\n## Slides model\n\nSlides: CardItem[] interface.\n\n```bash\n\nINTERFACE\n\nexport interface CardItem {\n    id: number;\n    title: string;\n    description?: string;\n    subtitle?: {\n        text: string;\n        icon?: string;\n    };\n    color: string;\n    imgUrl: string;\n    backgroundImgUrl?: string;\n    footer?: {\n        icons: {\n            leftIcon: string;\n            rightIcon: string;\n        },\n        values: {\n            leftValue: number;\n            rightValue: number;\n        }\n    },\n    currentPlacement: number;\n}\n\nEXAMPLE SLIDES\n\nslides = [{\n    id: 1,\n    title: 'User 1',\n    description: 'Wait a minute. Wait a minute, Doc. Uhhh...',\n    subtitle: {\n      text: 'Spain',\n      icon: \"fa fa-flag\"\n    },\n    color: '#1abc9c',\n    currentPlacement: 0,\n    imgUrl: 'https://www.resa.es/wp-content/uploads/2015/07/icon-user-default.png',\n    backgroundImgUrl: 'http://oxygennacdn3.oxygenna.com/wp-content/uploads/2015/11/18.jpg',\n    footer: {\n      icons: {\n          leftIcon: \"fa fa-users\",\n          rightIcon: \"fa fa-comments\"\n      },\n      values: {\n          leftValue:12,\n          rightValue: 4\n      }\n    }\n  },\n  {\n      id: 2,\n      title: 'User 2',\n      description: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Proin placerat molestie euismod. Etiam tincidunt luctus diam non ullamcorper. Maecenas eros est, iaculis hendrerit imperdiet nec, rhoncus in turpis. Vestibulum elementum mauris vitae nibh sagittis, et fermentum nunc aliquet. Donec sed ex sollicitudin, tristique sapien non, lacinia enim.',\n      subtitle: {\n        text: 'Spain',\n        icon: \"fa fa-flag\"\n      },\n      color: '#e67e22',\n      currentPlacement: 0,\n      imgUrl: 'https://www.resa.es/wp-content/uploads/2015/07/icon-user-default.png',\n      backgroundImgUrl: 'https://s-media-cache-ak0.pinimg.com/originals/d2/7b/4f/d27b4fa995194a0c77b8871a326a7c0b.jpg'\n  }];\n\n```\n\n## Component properties\n\n| Property       | Attribute        | Description | Type                                                        | Default                                                               |\n| -------------- | ---------------- | ----------- | ----------------------------------------------------------- | --------------------------------------------------------------------- |\n| `allowSwipeSlide`        | --                         |             | `{ prev: boolean; next: boolean; }`     | `{     prev: true,     next: true   }`                                      |\n| `animationSelectedSlide` | `animation-selected-slide` |             | `boolean`                               | `true`\n| `autoloop`     | --               |             | `{ enabled: boolean; seconds: number; direction: string; }` | `{     enabled: false,     seconds: 2000,     direction: 'right'   }` |\n| `axis`         | `axis`           |             | `string`                                                    | `'horizontal'`\n| `controls`     | --               |             | `{ enabled: boolean; position: string; text: string[]; }`   | `{     enabled: false,     position: 'top',     text: ['prev', 'next']   }` |\n| `distance`     | `distance`       |             | `number`                                                    | `undefined`\n| `initialSlide` | `initial-slide`  |             | `number`                                                    | `1`                                                                   |\n| `keyboard`     | `keyboard`       |             | `boolean`                                                   | `false`\n| `slideStyle`   | --               |             | `{}`                                                        | `{   }`\n| `slides`       | --               |             | `CardItem[]`                                                | `[]`                                                                  |\n| `slidesToShow` | `slides-to-show` |             | `number`                                                    | `6`\n\n## Component events\n\n| Event                  | Description | Type               |\n| ---------------------- | ----------- | ------------------ |\n| `currentItem`          |             | `CustomEvent\u003cany\u003e` |\n| `reachBeginningSlides` |             | `CustomEvent\u003cany\u003e` |\n| `reachEndSlides`       |             | `CustomEvent\u003cany\u003e` |\n| `selectedItem`         |             | `CustomEvent\u003cany\u003e` |\n| `slideChange`          |             | `CustomEvent\u003cany\u003e` |\n| `slideDoubleTap`       |             | `CustomEvent\u003cany\u003e` |\n\n## Component public API methods\n\n### `addSlide(index: number, slides: CardItem | CardItem[]) =\u003e Promise\u003cCardItem[]\u003e`\n\n```bash\nAdd new slides to the required index. Slides could be new slide or array with such slides.\n\nconst newSlides = [\n  {\n    id: Math.floor(Math.random() * 100),\n    title: 'User ' + Math.random().toString(36).substr(2, 4),\n    description: 'Wait a minute. Wait a minute, Doc. Uhhh...',\n    subtitle: {\n      text: 'Spain',\n      icon: \"fa fa-flag\"\n    },\n    color: '#e67e22',\n    currentPlacement: 0,\n    imgUrl: 'https://www.resa.es/wp-content/uploads/2015/07/icon-user-default.png',\n    backgroundImgUrl: 'https://ak2.picdn.net/shutterstock/videos/19300069/thumb/9.jpg'\n  },\n  {\n      id: Math.floor(Math.random() * 100),\n      title: 'User ' + Math.random().toString(36).substr(2, 4),\n      description: 'Wait a minute. Wait a minute, Doc. Uhhh...',\n      subtitle: {\n        text: 'Spain',\n        icon: \"fa fa-flag\"\n      },\n      color: '#e74c3c',\n      currentPlacement: 0,\n      imgUrl: 'https://www.resa.es/wp-content/uploads/2015/07/icon-user-default.png',\n      backgroundImgUrl: 'http://oxygennacdn1.oxygenna.com/wp-content/uploads/2017/01/header-image-6.jpg'\n  }\n];\n\n.addSlide(newSlides);\n```\n\n\n\n#### Returns\n\nType: `Promise\u003cCardItem[]\u003e`\n\n### `appendSlide(slides: CardItem[]) =\u003e Promise\u003cCardItem[]\u003e`\n\n```bash\nAdd new slide / slides to the end. Slides could be new slide or array with such slides.\n\nconst newSlides = [\n  {\n    id: Math.floor(Math.random() * 100),\n    title: 'User ' + Math.random().toString(36).substr(2, 4),\n    description: 'Wait a minute. Wait a minute, Doc. Uhhh...',\n    subtitle: {\n      text: 'Spain',\n      icon: \"fa fa-flag\"\n    },\n    color: '#e67e22',\n    currentPlacement: 0,\n    imgUrl: 'https://www.resa.es/wp-content/uploads/2015/07/icon-user-default.png',\n    backgroundImgUrl: 'https://ak2.picdn.net/shutterstock/videos/19300069/thumb/9.jpg'\n  },\n  {\n      id: Math.floor(Math.random() * 100),\n      title: 'User ' + Math.random().toString(36).substr(2, 4),\n      description: 'Wait a minute. Wait a minute, Doc. Uhhh...',\n      subtitle: {\n        text: 'Spain',\n        icon: \"fa fa-flag\"\n      },\n      color: '#e74c3c',\n      currentPlacement: 0,\n      imgUrl: 'https://www.resa.es/wp-content/uploads/2015/07/icon-user-default.png',\n      backgroundImgUrl: 'http://oxygennacdn1.oxygenna.com/wp-content/uploads/2017/01/header-image-6.jpg'\n  },\n  {\n    id: Math.floor(Math.random() * 100),\n    title: 'User ' + Math.random().toString(36).substr(2, 4),\n    description: 'Wait a minute. Wait a minute, Doc. Uhhh...',\n    subtitle: {\n      text: 'Spain',\n      icon: \"fa fa-flag\"\n    },\n    color: '#e67e22',\n    currentPlacement: 0,\n    imgUrl: 'https://www.resa.es/wp-content/uploads/2015/07/icon-user-default.png',\n    backgroundImgUrl: 'https://ak2.picdn.net/shutterstock/videos/19300069/thumb/9.jpg'\n  },\n  {\n      id: Math.floor(Math.random() * 100),\n      title: 'User ' + Math.random().toString(36).substr(2, 4),\n      description: 'Wait a minute. Wait a minute, Doc. Uhhh...',\n      subtitle: {\n        text: 'Spain',\n        icon: \"fa fa-flag\"\n      },\n      color: '#e74c3c',\n      currentPlacement: 0,\n      imgUrl: 'https://www.resa.es/wp-content/uploads/2015/07/icon-user-default.png',\n      backgroundImgUrl: 'http://oxygennacdn1.oxygenna.com/wp-content/uploads/2017/01/header-image-6.jpg'\n  },\n];\n\n  const newSlide = {\n    id: 18,\n    title: 'User 18',\n    description: 'Wait a minute. Wait a minute, Doc. Uhhh...',\n    subtitle: {\n      text: 'Spain',\n      icon: \"fa fa-flag\"\n    },\n    color: '#e67e22',\n    currentPlacement: 0,\n    imgUrl: 'https://www.resa.es/wp-content/uploads/2015/07/icon-user-default.png',\n    backgroundImgUrl: 'https://ak2.picdn.net/shutterstock/videos/19300069/thumb/9.jpg'\n  }\n\n.appendSlide(newSlides);\n.appendSlide(newSlide);\n\n```\n\n\n\n#### Returns\n\nType: `Promise\u003cCardItem[]\u003e`\n\n\n\n\n### `cycle() =\u003e Promise\u003cboolean\u003e`\n\n```bash\nRestarts cycling through the slides from left to right.\n```\n\n\n\n#### Returns\n\nType: `Promise\u003cboolean\u003e`\n\n\n\n### `getActiveIndex() =\u003e Promise\u003cnumber\u003e`\n\n```bash\nGet the index of the active slide.\n```\n\n\n\n#### Returns\n\nType: `Promise\u003cnumber\u003e`\n\n\n\n### `getNextIndex() =\u003e Promise\u003cnumber\u003e`\n\n```bash\nGet the index of the next slide.\n```\n\n\n\n#### Returns\n\nType: `Promise\u003cnumber\u003e`\n\n\n\n### `getPreviousIndex() =\u003e Promise\u003cnumber\u003e`\n\n```bash\nGet the index of the previous slide.\n```\n\n\n\n#### Returns\n\nType: `Promise\u003cnumber\u003e`\n\n\n\n### `isBeginning() =\u003e Promise\u003cboolean\u003e`\n\n```bash\nGet whether or not the current slide is the first slide.\n```\n\n\n\n#### Returns\n\nType: `Promise\u003cboolean\u003e`\n\n\n\n### `isEnd() =\u003e Promise\u003cboolean\u003e`\n\n```bash\nGet whether or not the current slide is the last slide.\n```\n\n\n\n#### Returns\n\nType: `Promise\u003cboolean\u003e`\n\n\n\n### `length() =\u003e Promise\u003cnumber\u003e`\n\n```bash\nGet the total number of slides.\n```\n\n\n\n#### Returns\n\nType: `Promise\u003cnumber\u003e`\n\n\n\n### `loadMore() =\u003e Promise\u003cCardItem[]\u003e`\n\n\n\n#### Returns\n\nType: `Promise\u003cCardItem[]\u003e`\n\n\n\n### `moreSlides() =\u003e Promise\u003cboolean\u003e`\n\n\n\n#### Returns\n\nType: `Promise\u003cboolean\u003e`\n\n\n\n### `next() =\u003e Promise\u003cCardItem\u003e`\n\n```bash\nNavigates to the next slide.\n```\n\n\n\n#### Returns\n\nType: `Promise\u003cCardItem\u003e`\n\n\n\n### `prependSlide(slides: CardItem | CardItem[]) =\u003e Promise\u003cCardItem[]\u003e`\n\n```bash\nAdd new slide / slides to the beginning. Slides could be new slide or array with such slides.\n\nconst newSlides = [\n  {\n    id: Math.floor(Math.random() * 100),\n    title: 'User ' + Math.random().toString(36).substr(2, 4),\n    description: 'Wait a minute. Wait a minute, Doc. Uhhh...',\n    subtitle: {\n      text: 'Spain',\n      icon: \"fa fa-flag\"\n    },\n    color: '#e67e22',\n    currentPlacement: 0,\n    imgUrl: 'https://www.resa.es/wp-content/uploads/2015/07/icon-user-default.png',\n    backgroundImgUrl: 'https://ak2.picdn.net/shutterstock/videos/19300069/thumb/9.jpg'\n  },\n  {\n      id: Math.floor(Math.random() * 100),\n      title: 'User ' + Math.random().toString(36).substr(2, 4),\n      description: 'Wait a minute. Wait a minute, Doc. Uhhh...',\n      subtitle: {\n        text: 'Spain',\n        icon: \"fa fa-flag\"\n      },\n      color: '#e74c3c',\n      currentPlacement: 0,\n      imgUrl: 'https://www.resa.es/wp-content/uploads/2015/07/icon-user-default.png',\n      backgroundImgUrl: 'http://oxygennacdn1.oxygenna.com/wp-content/uploads/2017/01/header-image-6.jpg'\n  }\n];\n\n.prependSlide(newSlides);\n```\n\n\n\n#### Returns\n\nType: `Promise\u003cCardItem[]\u003e`\n\n\n\n\n### `prev() =\u003e Promise\u003cCardItem\u003e`\n\n```bash\nNavigates to the previous slide.\n```\n\n\n#### Returns\n\nType: `Promise\u003cCardItem\u003e`\n\n\n\n### `reloadSlides() =\u003e Promise\u003cCardItem[]\u003e`\n\n\n\n#### Returns\n\nType: `Promise\u003cCardItem[]\u003e`\n\n\n\n### `removeAllSlides() =\u003e Promise\u003cCardItem[]\u003e`\n\n\n\n#### Returns\n\nType: `Promise\u003cCardItem[]\u003e`\n\n\n\n### `removeSlide(slideIndex: number | number[]) =\u003e Promise\u003cCardItem[]\u003e`\n\n\n\n#### Returns\n\nType: `Promise\u003cCardItem[]\u003e`\n\n\n\n### `select(slideId: string | number) =\u003e Promise\u003cCardItem\u003e`\n\n```bash\nGo to specific slide by number or keywords.\n\n.select(3);\n.select('prev');\n.select('next');\n.select('first');\n.select('last');\n```\n\n\n#### Returns\n\nType: `Promise\u003cCardItem\u003e`\n\n\n\n### `slideReset() =\u003e Promise\u003cCardItem\u003e`\n\n```bash\nReset swiper position to initial slide.\n```\n\n\n#### Returns\n\nType: `Promise\u003cCardItem\u003e`\n\n\n\n## Getting Started\n\nBefore you go through this component, you should have at least a basic understanding of Stencil concepts.\n\n```bash\ngit clone https://github.com/abritopach/st-3d-card-carousel\ncd st-3d-card-carousel\n```\n\nand run:\n\n```bash\nnpm install\nnpm start\n```\n\nTo build the component for production, run:\n\n```bash\nnpm run build\n```\n\nTo run the unit tests for the components, run:\n\n```bash\nnpm test\n```\n\n## Naming Components\n\nWhen creating new component tags, we recommend _not_ using `stencil` in the component name (ex: `\u003cstencil-datepicker\u003e`). This is because the generated component has little to nothing to do with Stencil; it's just a web component!\n\nInstead, use a prefix that fits your company or any name for a group of related components. For example, all of the Ionic generated web components use the prefix `ion`.\n\n\n## Using this component\n\n\n### Ionic / Angular project\n\n1) Install the package.\n\n```bash\nnpm install st-three-dimensional-card-carousel --save\n```\n\n2) Modify main.ts to import and make a call to defineCustomElements.\n\n```bash\nimport { enableProdMode } from '@angular/core'\nimport { platformBrowserDynamic } from '@angular/platform-browser-dynamic'\n\nimport { AppModule } from './app/app.module'\nimport { environment } from './environments/environment'\n\nimport { defineCustomElements } from 'st-three-dimensional-card-carousel/dist/loader'\n\nif (environment.production) {\n  enableProdMode()\n}\n\nplatformBrowserDynamic()\n  .bootstrapModule(AppModule)\n  .catch(err =\u003e console.log(err))\ndefineCustomElements(window)\n```\n\n3) Add the CUSTOM_ELEMENTS_SCHEMA.\n\n```bash\nimport { NgModule, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core'\nimport { CommonModule } from '@angular/common'\nimport { IonicModule } from '@ionic/angular'\nimport { FormsModule } from '@angular/forms'\nimport { RouterModule } from '@angular/router'\n\nimport { HomePage } from './home.page'\n\n@NgModule({\n  imports: [\n    CommonModule,\n    FormsModule,\n    IonicModule,\n    RouterModule.forChild([\n      {\n        path: '',\n        component: HomePage,\n      },\n    ]),\n  ],\n  schemas: [CUSTOM_ELEMENTS_SCHEMA],\n  declarations: [HomePage],\n})\nexport class HomePageModule {}\n```\n\n4) Use 3D card carousel web component in html\n\n```bash\n\u003cst-3D-card-carousel [slides]=\"slides\" [autoloop]=\"autoloop\" [distance]=\"slideDistance\" (selectedItem)=\"handleSelectedItem($event)\"\n  (slideChange)=\"handleSlideChange($event)\"\u003e\u003c/st-3D-card-carousel\u003e\n```\n\n### Vue project\n\n1) Install the package.\n\n```bash\nnpm install st-three-dimensional-card-carousel --save\n```\n\n2) Modify main.js to import and make a call to defineCustomElements.\n\n\n```bash\nimport Vue from 'vue'\nimport App from './App.vue'\n\nimport { defineCustomElements, applyPolyfills } from 'st-three-dimensional-card-carousel/loader';\n\nVue.config.productionTip = false\n\n// tell Vue to ignore all components defined in the st-three-dimensional-card-carousel/loader\n// package. The regex assumes all components names are prefixed.\n// 'st'\nVue.config.ignoredElements = [/st-\\w*/];\n\n// Bind the custom elements to the window object.\napplyPolyfills().then(() =\u003e {\n  defineCustomElements(window);\n});\n\nnew Vue({\n  render: h =\u003e h(App),\n}).$mount('#app')\n```\n\n3) Use 3D card carousel web component in jsx\n\nVue provides a way to explicitly pass the object as a property rather than an attribute, it is as simple as adding .prop to the property name of the stencil component.\n\n```bash\n\u003cst-3D-card-carousel v-bind:slides.prop=\"slides\" v-bind:autoloop.prop=\"autoloop\"\u003e\u003c/st-3D-card-carousel\u003e\n```\n\n### Example Ionic project\n\n- Component in Ionic project: https://github.com/abritopach/ionic-employees-stitch-mongodb\n\n![Component](readme_resources/component_ionic.gif \"Component\")\n\n### Example Angular project\n\n- Component in Angular project: https://github.com/abritopach/angular-architecture\n\n![Component](readme_resources/component_angular.gif \"Component\")\n\n### Example React project\n\n### Example Vue project\n\n- Component in Vue project: https://github.com/abritopach/vue-stencil-3d-card-carousel\n\n![Component](readme_resources/component_vue.gif \"Component\")\n\n### Script tag\n\n- [NPM](https://www.npmjs.com/package/st-three-dimensional-card-carousel)\n- Put a script tag similar to this `\u003cscript src='https://unpkg.com/st-three-dimensional-card-carousel@0.0.1/dist/st-three-dimensional-card-carousel.js'\u003e\u003c/script\u003e` in the head of your index.html\n- Then you can use the element anywhere in your template, JSX, html etc\n\n### Node Modules\n- Run `npm install st-three-dimensional-card-carousel --save`\n- Put a script tag similar to this `\u003cscript src='node_modules/my-component/dist/st-three-dimensional-card-carousel.js'\u003e\u003c/script\u003e` in the head of your index.html\n- Then you can use the element anywhere in your template, JSX, html etc\n\n### In a stencil-starter app\n- Run `npm install st-three-dimensional-card-carousel --save`\n- Add an import to the npm packages `import st-three-dimensional-card-carousel;`\n- Then you can use the element anywhere in your template, JSX, html etc\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fabritopach%2Fst-3d-card-carousel","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fabritopach%2Fst-3d-card-carousel","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fabritopach%2Fst-3d-card-carousel/lists"}