{"id":16795379,"url":"https://github.com/wojtekthewebdev/vue-section-scroller","last_synced_at":"2025-03-17T03:14:00.897Z","repository":{"id":57396611,"uuid":"379067707","full_name":"WojtekTheWebDev/vue-section-scroller","owner":"WojtekTheWebDev","description":"Vue.js component for switching sections with scrolling and swiping (on mobile). Built with Vue 3, Composition API and TypeScript.","archived":false,"fork":false,"pushed_at":"2021-08-05T08:13:45.000Z","size":163,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-23T12:46:43.156Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Vue","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/WojtekTheWebDev.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":"2021-06-21T21:31:02.000Z","updated_at":"2021-08-30T15:27:47.000Z","dependencies_parsed_at":"2022-08-27T14:20:35.948Z","dependency_job_id":null,"html_url":"https://github.com/WojtekTheWebDev/vue-section-scroller","commit_stats":null,"previous_names":["sikorawojciech/vue-section-scroller"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WojtekTheWebDev%2Fvue-section-scroller","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WojtekTheWebDev%2Fvue-section-scroller/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WojtekTheWebDev%2Fvue-section-scroller/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WojtekTheWebDev%2Fvue-section-scroller/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/WojtekTheWebDev","download_url":"https://codeload.github.com/WojtekTheWebDev/vue-section-scroller/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243965782,"owners_count":20375918,"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":[],"created_at":"2024-10-13T09:16:10.905Z","updated_at":"2025-03-17T03:14:00.870Z","avatar_url":"https://github.com/WojtekTheWebDev.png","language":"Vue","funding_links":[],"categories":[],"sub_categories":[],"readme":"# vue-section-scroller\nVue.js component for switching sections with scrolling and swiping (for mobile). Made with Vue 3, Composition API and TypeScript. \n\n## Getting started\n\n### Installation\n```bash\nnpm install vue-section-scroller -D\n\n# or\n\nyarn add vue-section-scroller -D\n```\nThen, import and register the component:\n```js\nimport VueSectionScroller from \"vue-section-scroller\";\n```\nYou need also to import the styles separately:\n```js\nimport \"vue-section-scroller/dist/vue-section-scroller.css\"\n```\nFinally, add to your component:\n```js\n...\ncomponents: {\n  VueSectionScroller,\n  // Other components\n}\n...\n```\n\n### Usage\nFirst, create the array of sections in your component. If you are using TypeScript, Section type is included in the library:\n```js\n/* Vue 3 + TypeScript */\nimport Section from 'vue-section-scroller/src/types/Section';\n  // Component creation etc...\n  setup() {\n      const sections: Section[] = [\n        {\n          id: 1, // Unique identifier\n          label: \"Component label\", // Label displayed in the aside\n          component: SomeComponent, // Component displayed in the section\n          props: { // Component props, should be an object with key - value pairs.\n          },\n        },\n        // rest of the sections\n      ];\n\n      // other code\n\n      return {\n        sections,\n        // other returns\n      };\n  }\n```\n```html\n\u003cvue-section-scroller :sections=\"sections\"\u003e\u003c/vue-section-scroller\u003e\n```\n\n### Props\n\n| Prop         | Type      | Default   | Description                        |\n| ---          | ---       | ---       | ---                                |\n| sections     | Section[] | []        | Array of component's sections.     |\n| asideLeft    | Boolean   | false     | Show aside on the left.            |\n| asideLabels  | Boolean   | false     | Show aside labels.                 |\n| dots         | Boolean   | true      | Show aside dots. If customPrefix is enabled, it overrides the dots. |\n| customPrefix | Boolean   | false     | Show custom aside prefixes. Overrides the dots. |\n| baseColor    | String    | \"#323330\" | Color of inactive dots and labels. |\n| activeColor  | String    | \"#323330\" | Color of active dots and labels.  |\n| showChevrons | Boolean   | true      | Show chevrons at the top and bottom of the component. |\n\n## Live Demo\n\nhttps://codesandbox.io/s/vue-section-scroller-demo-tsyzd\n\n## Credits\nThanks to [vue-sfc-rollup](https://github.com/team-innovation/vue-sfc-rollup) for the SFC template ready to publish. I wish I had known this before.\n\n## License\n[MIT License](https://github.com/SikoraWojciech/vue-section-scroller/blob/master/LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwojtekthewebdev%2Fvue-section-scroller","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwojtekthewebdev%2Fvue-section-scroller","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwojtekthewebdev%2Fvue-section-scroller/lists"}