3. Default types
Matthieu Stroh edited this page Jun 28, 2019
·
2 revisions
Mandatory parameters to supply for every types
Name | Type | Default value | Description |
---|---|---|---|
group | string |
- | Lightbox UID |
type | string |
- | Element type should be either image , video , youtube , map or any registered custom type |
* target | string |
- | Trigger |
Display a regular image
Name | Type | Default value | Description |
---|---|---|---|
src | string |
- | Image URL |
* width | number |
-1 |
Width in px, by default -1 it uses native width |
* height | number |
-1 |
Height in px, by default -1 it uses native height |
* alt | string |
- | Alternate text |
{
"type": "image",
"group": "lightbox-1",
"src": "./img/poney.jpg",
"alt": ""
}
Display a Google Map within the lightbox
Name | Type | Default value | Description |
---|---|---|---|
api_key | string |
- | Google Map API key |
lat | number |
0.0 |
Latitude |
lng | number |
0.0 |
Longitude |
* zoom | number |
8 |
Zoom level |
* width | number |
1024 |
Width in px |
* height | number |
720 |
Height in px |
* lang | string |
fr |
Language |
* styles | Array |
- | Map styles objects https://mapstyle.withgoogle.com |
{
"type": "map",
"group": "lightbox-1",
"api_key": "YOUR_API_KEY",
"lat": 48.5692059,
"lng": 7.692055,
"zoom": 15,
"width": 1600,
"height": 900,
}
Display a Youtube video with the iframe API
Name | Type | Default value | Description |
---|---|---|---|
src | string |
- | URL to a youtube video |
* width | number |
854 |
Width in px |
* height | number |
480 |
Height in px |
* rel | boolean |
true |
Toggle related videos |
* autoplay | boolean |
false |
Toggle autoplay |
* controls | boolean |
true |
Toggle controls |
* showinfo | boolean |
true |
Toggle video information |
* start | number |
0 |
Start the video at a given timecode |
* allowFullscreen | boolean |
true |
Allow/disallow fullscreen |
{
"type": "youtube",
"group": "lightbox-1",
"src": "https://www.youtube.com/watch?v=9rIy0xY99a0",
"autoplay": false,
"rel": false,
"showinfo": false,
"controls": true,
"allowFullscreen": false,
}
Display a video with the HTML5 API
Name | Type | Default value | Description |
---|---|---|---|
src | string |
- | Source of the video |
* width | number |
854 |
Width in px |
* height | number |
480 |
Height in px |
* autoplay | boolean |
false |
Toggle autoplay |
* controls | boolean |
true |
Toggle controls |
{
"type": "video",
"group": "lightbox-1",
"src": "./video/poney.mp4",
"autoplay": false,
"controls": true,
}