{"id":30420713,"url":"https://github.com/skybrud/sky-swiper","last_synced_at":"2025-08-22T08:19:57.908Z","repository":{"id":27094168,"uuid":"101051324","full_name":"skybrud/sky-swiper","owner":"skybrud","description":"A versatile slot-based Vue swiper component","archived":false,"fork":false,"pushed_at":"2022-12-09T08:18:23.000Z","size":412,"stargazers_count":0,"open_issues_count":8,"forks_count":1,"subscribers_count":9,"default_branch":"master","last_synced_at":"2025-07-29T06:57:58.798Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/skybrud.png","metadata":{"files":{"readme":"README.md","changelog":null,"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":"2017-08-22T10:29:17.000Z","updated_at":"2019-06-24T12:28:19.000Z","dependencies_parsed_at":"2023-01-14T09:15:32.982Z","dependency_job_id":null,"html_url":"https://github.com/skybrud/sky-swiper","commit_stats":null,"previous_names":[],"tags_count":18,"template":false,"template_full_name":null,"purl":"pkg:github/skybrud/sky-swiper","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skybrud%2Fsky-swiper","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skybrud%2Fsky-swiper/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skybrud%2Fsky-swiper/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skybrud%2Fsky-swiper/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/skybrud","download_url":"https://codeload.github.com/skybrud/sky-swiper/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skybrud%2Fsky-swiper/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271606604,"owners_count":24788981,"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","status":"online","status_checked_at":"2025-08-22T02:00:08.480Z","response_time":65,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":[],"created_at":"2025-08-22T08:19:57.628Z","updated_at":"2025-08-22T08:19:57.901Z","avatar_url":"https://github.com/skybrud.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# sky-swiper\n\u003e A versatile slot-based Vue swiper component\n\n## Installation\n```bash\nnpm install sky-swiper\n```\nor\n```bash\nyarn add sky-swiper\n```\n\n\n## Usage\nBegin by importing and installing the SkySwiper Vue plugin\n```js\nimport Vue from 'vue';\nimport SkySwiper from 'sky-swiper';\n\n// If you want to use the baseline scss add the following line\nimport '${YOUR-PROJECT-ROOT-PATH}/node_modules/sky-swiper/src/SkySwiper.scss';\n\nVue.use(SkySwiper);\n\n```\nThe `\u003cSkySwiper /\u003e` component registers globally. It uses the `items` prop in conjunction with slots to allow you to render any kind of data inside the swiper.\n\n### Basic markup\nJust content:\n```html\n\u003cSkySwiper\n\t:items=\"[\n\t\t{ imageSrc: '/link-to-image.jpg' },\n\t\t{ imageSrc: '/link-to-image-2.jpg' },\n\t]\"\n\u003e\n\t\u003cdiv slot=\"content\" slot-scope=\"{ item }\"\u003e\n\t\t\u003c!-- Template for rendering an item here, ie: --\u003e\n\t\t\u003cimg :src=\"item.imageSrc\" /\u003e\n\t\u003c/div\u003e\n\u003c/SkySwiper\u003e\n```\n\nContent and caption:\n```html\n\u003cSkySwiper\n\t:items=\"[\n\t\t{ imageSrc: '/link-to-image.jpg', description: 'Description text 1' },\n\t\t{ imageSrc: '/link-to-image-2.jpg', description: 'Description text 2' },\n\t]\"\n\u003e\n\t\u003cdiv slot=\"content\" slot-scope=\"{ item }\"\u003e\n\t\t\u003c!-- Template for rendering an item here, ie: --\u003e\n\t\t\u003cimg :src=\"item.imageSrc\" /\u003e\n\t\u003c/div\u003e\n\n\t\u003cdiv slot=\"caption\" slot-scope=\"{ item }\"\u003e\n\t\t\u003c!-- Template for captions, ie: --\u003e\n\t\t\u003cp v-text=\"item.description\" /\u003e\n\t\u003c/div\u003e\n\u003c/SkySwiper\u003e\n```\n\n### Props\nThe component receives 4 props:\n- `items`: An array (required). Functions as the data layer of the swiper. The array can contain whichever kind of items you need since the content-slot functions as a template for rendering the data as well.\n- `controls`: Configure UI-elements to show inside the swiper content\n\t```js\n\t\u003cSkySwiper :controls=\"{\n\t\t// show/hide next button on top of swiper content\n\t\tnext: true || false,\n\t\t// show/hide previous button on top of swiper content\n\t\tprevious: true || false,\n\t\t// show/hide custom cursor control on top of swiper content\n\t\tcursor: true || false,\n\t}\"\u003e\n\t```\n- `navigation`: Configure UI-elements to display outside the swiper content\n\t```js\n\t\u003cSkySwiper :navigation=\"{\n\t\t// The navigation element can either appear above the figcaption ('before-caption') or below ('after-caption')\n\t\tlocation: 'before-caption' || 'after-caption',\n\t\t// 'none': show no indicators, 'pagination': show slide number (eg. \"2/10\"), 'bullets': show list of clickable bullets\n\t\tindicator: 'none' || 'pagination' || 'bullets',\n\t\t// show/hide next button in navigation\n\t\tnext: true || false,\n\t\t// show/hide previous button in navigation\n\t\tprevious: true || false,\n\t}\"\u003e\n\t```\n\n### Slots\nThe component provides these basic slots:\n- `\"content\"` - **Required.**. Uses data from the items prop. Scoped slot with these bindings: `{ item, index }`\n- `\"caption\"` - Uses data from the items prop. Scoped slot with these bindings: `{ item, index }`\n\nApart fron these there are more advanced slots for customizing the look in detail (more documentation needed):\n- `\"cursor\"` - Custom cursor icon. Scoped slot with these bindings: `{ direction, active, pressed }`\n- `\"controls-next\"` - Custom next icon\n- `\"controls-previous\"` - Custom previous icon\n- `\"navigation-next\"` - Custom next icon (in the navigation)\n- `\"navigation-previous\"` - Custom previous icon (in the navigation)\n- `\"bullets\"` - Custom icon of the bullets in the navigation. Scoped slot with these bindings: `{ active, index }`\n\n\n## Example\nThis basic concept can be expanded upon by using all available slots and configuration props to completely customize the swiper.\n```html\n\u003cSkySwiper\n\t:items=\"[\n\t\t{ imageSrc: '/link-to-image.jpg', description: 'Description text 1' },\n\t\t{ imageSrc: '/link-to-image-2.jpg', description: 'Description text 2' },\n\t]\"\n\t:controls=\"{\n\t\tnext: true,\n\t\tprevious: false,\n\t\tcursor: true\n\t}\"\n\t:navigation=\"{\n\t\tnext: true,\n\t\tprevious: false,\n\t\tlocation: 'above-caption'\n\t\tindicator: 'bullets'\n\t}\"\n\u003e\n\t\u003cdiv slot=\"content\" slot-scope=\"{ item }\"\u003e\n\t\t\u003cimg :src=\"item.imageSrc\" /\u003e\n\t\u003c/div\u003e\n\n\t\u003cdiv slot=\"caption\" slot-scope=\"{ item }\"\u003e\n\t\t\u003cp v-text=\"item.description\" /\u003e\n\t\u003c/div\u003e\n\n\t\u003cdiv slot=\"cursor\" slot-scope=\"{ direction }\"\u003e\n\t\t\u003cimg v-if=\"direction === 'next'\" src=\"'/arrow-right.png'\" /\u003e\n\t\t\u003cimg v-if=\"direction === 'previous'\" src=\"'/arrow-left.png'\" /\u003e\n\t\u003c/div\u003e\n\n\t\u003cdiv slot=\"controls-next\"\u003e\n\t\t\u003cimg src=\"'/arrow-right.png'\" /\u003e\n\t\u003c/div\u003e\n\n\t\u003cdiv slot=\"navigation-next\"\u003e\n\t\t\u003cimg src=\"'/arrow-small-right.png'\" /\u003e\n\t\u003c/div\u003e\n\n\t\u003cdiv slot=\"bullet\" slot-scope=\"{ active }\"\u003e\n\t\t\u003cimg v-if=\"active\" src=\"'/bullet-active.png'\" /\u003e\n\t\t\u003cimg v-else src=\"'/bullet.png'\" /\u003e\n\t\u003c/div\u003e\n\u003c/SkySwiper\u003e\n```\n\n\n## Credits\n\nThis module is made by the front-end team at [Skybrud.dk](http://www.skybrud.dk/).\nFeel free to use it in any way you want. Feedback, questions and bug reports should be posted as issues. Pull-requests appreciated!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fskybrud%2Fsky-swiper","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fskybrud%2Fsky-swiper","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fskybrud%2Fsky-swiper/lists"}