0.1.7 • Published 2 years ago
custom-banner-vue v0.1.7
custom-banner-vue
Features:
- Optional orientation
- Optional size
- Customizable Elements order
- Transition's configuration of every element.
- Time settings.
Optional images or texts
Orientation
- Two options for orientation: horizontal or vertical
- Horizontal is the option by default.
Size
- Two options for size: min or medium
- Medium is the option by default.
Responsive
- Two options for responsive: false or true
- True is the option by default.
- Only available for horizontal orientation
Screen
- Two options for screen: default or full
- Full is the option by default.
- Only available for horizontal orientation
- The screen property with full value set responsive to true value automatically.
Order
- The order or sequence allows handling which element will perform animations and possiblity of add new animations.
Transitions
Six differents transitions:
- width,height,left,top,rotate,opacity.
Opacity provide perform together anyone of the others at time.
Time
- Configuration of time between one animation and the next.
Images/Texts
- Possibility of texts improving performance.
Install
npm install custom-banner-vue
Import globally
import CustomBannerVue from 'custom-banner-vue'
Vue.use(CustomBannerVue)
Import locally
import { CustomBannerVue } from 'custom-banner-vue'
- Configuration
Template
<template>
<div>
<custom-banner-vue :options="options"></custom-banner-vue>
</div>
</template>
Basic
...
data() {
return {
options:{
orientation:"horizontal",
time:5,
images:[
//folder public
[
"img/image1.jpg",
"img/image2.jpg",
"img/image3.jpg"
],
//folder assets
[
require("@/assets/img/image1.jpg"),
require("@/assets/img/image2.jpg"),
require("@/assets/img/image3.png")
],
//absolute path
[
"http://www.server/image1.jpg",
"http://www.server/image2.jpg",
"http://www.server/image3.jpg"
]
],
}
}
},
....
Basic (texts)
...
options:{
orientation:"vertical",
texts:[
[
"Regístrese ahora y obtendrá",
"un cupón de descuento de 5€",
"en su próxima compra"
],
[
"Si desea más información",
"póngase en contacto con uno",
"de nuestro asesores llamando al 606060606"
],
[
"Welcome to mydomain.com",
"browse the different sections"
]
],
effects:{
1:{
modeText:true
},
2:{
modeText:true
},
3:{
modeText:true
}
}
}
...
Order && Effects
...
options:{
orientation:"vertical",
size:"min",
images:[
[
"img/image1.jpg",
"img/image2.jpg",
"img/image3.jpg"
],
[
"img/image1.png",
"img/image2.png",
"img/image3.png"
],
[
"http://www.server/image1.jpg",
"http://www.server/image2.jpg",
"http://www.server/image3.jpg"
]
],
effects:{
1:{
opacity:true,
width:true,
},
2:{
top:true
},
3:{
rotate:true
}
},
order:{
0:[1,3],
1:[2],
2:[3],
3:[1,2,3]
...
...
}
},
...
Images and texts
options:{
orientation:"vertical",
size:"min",
responsive:true,
screen:'full',
images:[
[
"img/image1.jpg",
"img/image2.jpg",
"img/image3.jpg"
],
[
"img/image1.png",
"img/image2.png",
"img/image3.png"
],
[
"http://www.server/image1.jpg",
"http://www.server/image2.jpg",
"http://www.server/image3.jpg"
]
],
texts:[
[
"Welcome to mydomain.com",
"browse the different sections"
],
[],
[]
],
effects:{
1:{
opacity:true,
width:true,
modeText:true
},
2:{
left:true
},
3:{
opacity:true
}
},
},
...
Other options
- widthHTML
- The widthHTML property allows assign attribute width of image, can be useful some times for to reduce the image or keep dimensions to width effect.
...
effects:{
1:{
opacity:true,
width:true,
widthHTML:120,
},
2:{
left:true
modeText:true,
},
3:{
opacity:true
}
},
...
- fontSizeStyle * The fontSizeStyle property allows assign one different size of font for every element. The text's option set the size of first text of the list by default, so handling fontSizeStyle can be really useful.
...
effects:{
1:{
opacity:true,
width:true,
},
2:{
left:true
modeText:true,
fontSizeStyle:"20px",
},
3:{
opacity:true
}
}
...
License
custom-banner-vue is released under MIT license
0.1.66
2 years ago
0.1.67
2 years ago
0.1.68
2 years ago
0.1.69
2 years ago
0.1.7
2 years ago
0.1.55
2 years ago
0.1.56
2 years ago
0.1.57
2 years ago
0.1.58
2 years ago
0.1.59
2 years ago
0.1.63
2 years ago
0.1.64
2 years ago
0.1.65
2 years ago
0.1.60
2 years ago
0.1.61
2 years ago
0.1.62
2 years ago
0.1.31
2 years ago
0.1.32
2 years ago
0.1.33
2 years ago
0.1.34
2 years ago
0.1.35
2 years ago
0.1.4
2 years ago
0.1.3
2 years ago
0.1.5
2 years ago
0.1.0
4 years ago
0.1.2
4 years ago
0.1.1
4 years ago
0.0.968
4 years ago
0.0.967
4 years ago
0.0.971
4 years ago
0.0.970
4 years ago
0.0.969
4 years ago
0.0.966
4 years ago
0.0.965
4 years ago
0.0.96
4 years ago
0.0.95
4 years ago
0.0.94
4 years ago
0.0.93
4 years ago