Skip to content

Commit

Permalink
Update README installation text
Browse files Browse the repository at this point in the history
  • Loading branch information
David Cetinkaya committed Mar 18, 2019
1 parent a7bec96 commit bccd861
Showing 1 changed file with 43 additions and 2 deletions.
45 changes: 43 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Embla Carousel - Simple and sensible carousels for the web
# Embla Carousel

Embla is a lightweight carousel plugin for the web with no dependencies. It's 100% open source and free to use on both personal and commercial projects. Use it with the module bundler of your choice or by manually injecting the script.

Expand All @@ -10,4 +10,45 @@ If you are using a module bundler...
yarn add embla-carousel
```

...or inject the minified script [here](https://github.com/davidcetinkaya/embla-carousel/blob/master/sandbox/index.js) into your website.
...or inject the minified script [here](https://raw.githubusercontent.com/davidcetinkaya/embla-carousel/master/sandbox/index.js) into your website.

```html
<script src="embla.min.js"></script>
```

Setup your HTML markup...

```html
<div class="slider">
<div class="slider__container">
<div class="slider__slide">
...
</div>
<div class="slider__slide">
...
</div>
<div class="slider__slide">
...
</div>
</div>
</div>
```

...Add some CSS...

```css
.slider {
overflow: hidden;
}
.slider__container {
display: flex;
will-change: transform;
}
.slider__slide {
position: relative;
flex: 0 0 auto;
width: 100%;
}
```

...And you're good to go!

0 comments on commit bccd861

Please sign in to comment.