https://github.com/grapesjs/components-lory
GrapesJS Slider Component by using lory
https://github.com/grapesjs/components-lory
Last synced: about 1 year ago
JSON representation
GrapesJS Slider Component by using lory
- Host: GitHub
- URL: https://github.com/grapesjs/components-lory
- Owner: GrapesJS
- License: bsd-3-clause
- Created: 2018-01-09T12:39:27.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2018-01-09T12:40:11.000Z (over 8 years ago)
- Last Synced: 2025-04-07T07:18:17.778Z (about 1 year ago)
- Language: JavaScript
- Size: 72.3 KB
- Stars: 29
- Watchers: 4
- Forks: 30
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# GrapesJS Lory Slider
Slider component by using [lory](https://github.com/meandmax/lory)
[Demo](http://grapesjs.com/demo.html)
## Requirements
* GrapesJS v0.12.60 or higher
## Summary
* Plugin name: `grapesjs-lory-slider`
* Components
* `lory-slider`
* `lory-slides`
* `lory-slide`
* `lory-frame`
* `lory-prev`
* `lory-next`
* Blocks
* `lory-slider`
## Options
| Option | Description | Default |
|-|-|-
| `sliderBlock` | Object to extend the default slider block, eg. `{ label: 'Slider', attributes: { ... } }` | `{}` |
| `sliderProps` | Object to extend the default slider properties, eg. `{ name: 'My Slider', draggable: false, ... }` | `{}` |
| `frameProps` | Object to extend the default slider frame properties | `{}` |
| `slidesProps` | Object to extend the default slides properties | `{}` |
| `slideProps` | Object to extend the default slide properties | `{}` |
| `prevProps` | Object to extend the default previous nav properties | `{}` |
| `nextProps` | Object to extend the default next nav properties | `{}` |
| `slideEls` | Default slides | `
...` (3 slides) |
| `prevEl` | Previous nav element string (eg. HTML string) | `
var editor = grapesjs.init({
container : '#gjs',
...
plugins: ['grapesjs-lory-slider'],
pluginsOpts: {
'grapesjs-lory-slider': {
// options
}
}
});
```
## Development
Clone the repository
```sh
$ git clone https://github.com/artf/grapesjs-lory-slider.git
$ cd grapesjs-lory-slider
```
Install dependencies
```sh
$ npm i
```
The plugin relies on GrapesJS via `peerDependencies` so you have to install it manually
```sh
$ npm i grapesjs --no-save
```
Start the dev server
```sh
$ npm start
```
## License
BSD 3-Clause