Skip to content

Minimal documentation and option to delay auto initialization of glidejs #2

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
node_modules/
dist/

.package-lock.json
.idea
.vscode
.DS_Store

package-lock.json
yarn.lock
6 changes: 6 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -1 +1,7 @@
config/
node_modules/

.editorconfig
.vscode

.DS_Store
77 changes: 77 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,87 @@
A Glide.js extension for Vue

### Installation

```
npm install --save vue-glide
```

### Usage

```js
import VueGlide from "@glidejs/vue-glide/src";

Vue.use(VueGlide);

new Vue({
// ...
});

// OR
import Glide from "@glidejs/vue-glide/src/components/Glide";
import GlideTrack from "@glidejs/vue-glide/src/components/Track";
import GlideSlide from "@glidejs/vue-glide/src/components/Slide";

new Vue({
components: {
Glide,
GlideTrack,
GlideSlide,
},

// ...
});
```

Inside a component

```html
<template>
<glide>
<glide-track>
<glide-slide>
<a href="https://placeholdit.co/i/2000x1000?bg=0000ff">
<img src="https://placeholdit.co/i/2000x1000?bg=0000ff" alt="">
</a>
</glide-slide>

<glide-slide>
<a href="https://placeholdit.co/i/2000x1000?bg=aaffaa">
<img src="https://placeholdit.co/i/2000x1000?bg=aaffaa" alt="">
</a>
</glide-slide>

<glide-slide>
<a href="https://placeholdit.co/i/2000x1000?bg=ff0000">
<img src="https://placeholdit.co/i/2000x1000?bg=ff0000" alt="">
</a>
</glide-slide>
</glide-track>

<div class="glide__arrows" data-glide-el="controls">
<button
class="glide__arrow glide__arrow--left"
data-glide-dir="<">
Previous
</button>

<button
class="glide__arrow glide__arrow--right"
data-glide-dir=">">
Next
</button>
</div>
</glide>
</template>
```

Import the glidejs stylesheet (scss)

```scss
@import "~@glidejs/glide/src/assets/sass/glide.core";
@import "~@glidejs/glide/src/assets/sass/glide.theme"; // (optional)
```

## Credits

- [Jędrzej Chałubek][https://github.com/jedrzejchalubek] - creator
Expand Down
Loading