Top
We have use bootstrap to design most of the components, make sure you install it and integrate with the project.
step 1:
npm install --save bootstrap
step 2:
In your plugins/main.js file all the following code:
import 'bootstrap/dist/css/bootstrap.css'
import "bootstrap"
import "bootstrap/dist/js/bootstrap.min.js";
Inside Your template tags add
<button type="button" class="btn btn-primary">Primary Button</button>
<button type="button" class="btn btn-secondary">Secondary Button</button>
<button type="button" class="btn btn-success">Success Button</button>
<button type="button" class="btn btn-info">Info Button</button>
<button type="button" class="btn btn-warning">Warning Button</button>
<button type="button" class="btn btn-danger">Danger Button</button>
<button type="button" class="btn btn-light">Light Button</button>
To use another types button you have to link the related css file according to types of buttons in a head tag
Inside Your template tags add
<span class="badge badge-primary">Primary</span>
<span class="badge badge-secondary">Secondary</span>
<span class="badge badge-success">Success</span>
<span class="badge badge-info">Info</span>
<span class="badge badge-warning text-dark">Warning</span>
<span class="badge badge-danger">Danger</span>
<span class="badge badge-light text-dark">Light</span>
<span class="badge badge-dark tag-pills-sm-mb">Dark</span>
Inside Your template tags add
<div class="progress mb-2">
<div class="progress-bar" role="progressbar" aria-valuenow="0" aria-valuemin="0" aria-valuemax="100">
</div>
<div class="progress mb-2">
<div class="progress-bar bg-primary" role="progressbar" style="width: 25%" aria-valuenow="25" aria-valuemin="0" aria-valuemax="100">
</div>
<div class="progress mb-2">
<div class="progress-bar bg-secondary" role="progressbar" style="width: 50%" aria-valuenow="50" aria-valuemin="0" aria-valuemax="100">
</div>
<div class="progress mb-2">
<div class="progress-bar bg-success" role="progressbar" style="width: 75%" aria-valuenow="75" aria-valuemin="0" aria-valuemax="100">
</div>
<div class="progress mb-2">
<div class="progress-bar bg-info" role="progressbar" style="width: 100%" aria-valuenow="100" aria-valuemin="0" aria-valuemax="100">
</div>
Inside Your template tags add
<div class="alert alert-primary" role="alert">This is a primary alert—check it out!</div>
<div class="alert alert-secondary" role="alert">This is a secondary alert—check it out!</div>
<div class="alert alert-success" role="alert">This is a success alert—check it out!</div>
<div class="alert alert-info" role="alert">This is a info alert—check it out!</div>
<div class="alert alert-warning" role="alert">This is a warning alert—check it out!</div>
<div class="alert alert-danger" role="alert">This is a danger alert—check it out!</div>
<div class="alert alert-light" role="alert">This is a light alert—check it out!</div>
<div class="alert alert-dark" role="alert">This is a light alert—check it out!</div>
Inside Your template tags add
<button type="button" class="btn btn-primary example-popover mr-1" data-bs-toggle="popover" title="Popover title" data-bs-content="And here's some amazing content. It's very engaging. Right?">Click to toggle popover</button>
<a tabindex="0" class="example-popover btn btn-secondary" role="button" data-bs-toggle="popover" data-bs-trigger="focus" title="Popover title" data-bs-content="And here's some amazing content. It's very engaging. Right?">Dismissible popover</a>
<button type="button" data-bs-trigger="hover" class="example-popover btn btn-success" data-container="body" data-bs-toggle="popover" data-bs-placement="bottom" title="Popover title" data-offset="-20px -20px" data-bs-content="Vivamus sagittis lacus vel augue laoreet rutrum faucibus." >On Hover Tooltip</button>
Inside Your script tags add
import { Popover } from 'bootstrap/dist/js/bootstrap.esm.min.js'
export default {
mounted() {
new Popover(document.body, {
selector: "[data-bs-toggle='popover']",
})
}
}
Inside Your template tags add
<button class="example-popover btn btn-primary" type="button" data-container="body" data-bs-toggle="tooltip" data-bs-placement="top"
title="Popover title">Click to toggle popover</button>
Inside Your script tags add
import { Tooltip } from 'bootstrap/dist/js/bootstrap.esm.min.js'
export default {
mounted() {
new Tooltip(document.body, {
selector: "[data-bs-toggle='tooltip']",
}),
}
}
Inside Your template tags add
<div class="dropdown">
<button class="dropbtn btn-primary" type="button"> Dropdown Button
<span><i className="icofont icofont-arrow-down"></i></span></button>
<div className="dropdown-content">
<a href="#">Action </a>
<a href="#">Another Action </a>
<a href="#">Something Else Here </a>
</div>
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting,remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages,and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting,remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages,and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum
Inside Your template tags add
<ul class="nav nav-tabs" id="myTab" role="tablist">
<li class="nav-item" role="presentation">
<button class="nav-link active" id="home-tab" data-bs-toggle="tab" data-bs-target="#home" type="button" role="tab" aria-controls="home" aria-selected="true">Home</button>
</li>
<li class="nav-item" role="presentation">
<div class="dropdown">
<button class="dropbtn btn-primary" type="button"> Dropdown Button
<span><i className="icofont icofont-arrow-down"></i></span></button>
<div className="dropdown-content">
<a href="#">Action </a>
<a href="#">Another Action </a>
<a href="#">Something Else Here </a>
</div>
</li>
<li class="nav-item" role="presentation">
<button class="nav-link" id="profile-tab" data-bs-toggle="tab" data-bs-target="#profile" type="button" role="tab" aria-controls="profile" aria-selected="false">Profile</button>
</li>
<li class="nav-item" role="presentation">
<button class="nav-link" id="contact-tab" data-bs-toggle="tab" data-bs-target="#contact" type="button" role="tab" aria-controls="contact" aria-selected="false">Contact</button>
</li>
</ul>
<div class="tab-content" id="myTabContent">
<div class="tab-pane fade show active" id="home" role="tabpanel" aria-labelledby="home-tab">
<p>
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's
standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make
a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting,
remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing
Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum
</p>
</div>
<div class="tab-pane fade" id="profile" role="tabpanel" aria-labelledby="profile-tab">
<p>
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's
standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make
a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting,
remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing
Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum
</p>
</div>
<div class="tab-pane fade" id="contact" role="tabpanel" aria-labelledby="contact-tab">
<p>
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's
standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make
a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting,
remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing
Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum
</p>
</div>
</div>
Inside Your template tags add
<div class="default-according" id="accordion">
<div class="card">
<div class="card-header" id="headingOne">
<h5 class="mb-0">
<button class="btn btn-link" data-bs-toggle="collapse" data-bs-target="#collapseOne" aria-expanded="true" aria-controls="collapseOne"> Collapsible Group Item #<span>1</span></button> </h5>
</div>
<div class="collapse show" id="collapseOne" aria-labelledby="headingOne" data-bs-parent="#accordion">
<div class="card-body">
{{desc}}
</div>
</div>
</div>
<div class="card">
<div class="card-header" id="headingOne">
<h5 class="mb-0">
<button class="btn btn-link" data-bs-toggle="collapse" data-bs-target="#collapseOne" aria-expanded="true" aria-controls="collapseOne"> Collapsible Group Item #<span>2</span></button> </h5>
</div>
<div class="collapse show" id="collapseOne" aria-labelledby="headingOne" data-bs-parent="#accordion">
<div class="card-body">
{{desc}}
</div>
</div>
</div>
<div class="card">
<div class="card-header" id="headingOne">
<h5 class="mb-0">
<button class="btn btn-link" data-bs-toggle="collapse" data-bs-target="#collapseOne" aria-expanded="true" aria-controls="collapseOne"> Collapsible Group Item #<span>3</span></button> </h5>
</div>
<div class="collapse show" id="collapseOne" aria-labelledby="headingOne" data-bs-parent="#accordion">
<div class="card-body">
{{desc}}
</div>
</div>
</div>
</div>
Inside Your script tags add
export default {
data(){
return{
desc:"Anim pariatur cliche reprehenderit, enim eiusmod high life accusamus terry richardson ad squid.
3 wolf moon officia aute, non cupidatat skateboard dolor brunch. Food truck quinoa nesciunt laborum eiusmod.
Brunch 3 wolf moon tempor, sunt aliqua put a bird on it squid single-origin coffee nulla assumenda shoreditch et."
}
},
}
Installing and usage
npm i vue3-perfect-scrollbar
In your plugins/main.js file all the following code:
import PerfectScrollbar from 'vue3-perfect-scrollbar'
import 'vue3-perfect-scrollbar/dist/vue3-perfect-scrollbar.css'
.use(PerfectScrollbar)
Inside Your template tags add
<perfect-scrollbar class="scrollbar-margins large-margin scroll-demo p-0" v-once :settings="settings">
<img src="../../../assets/images/banner/3.jpg" alt="girl" width="800" height="600" >
</perfect-scrollbar>
Inside Your script tags add
export default {
data() {
return{
settings: {
maxScrollbarLength: 60
},
}
}
}
Installing and usage
npm i vue3-tree
Inside Your template tags add
<Tree :nodes="menu" :use-icon="true" @nodeExpanded="onNodeExpanded" @update="onUpdate" />
Inside Your script tags add
import Tree from "vue3-tree";
import "vue3-tree/dist/style.css";
export default {
components: { Tree },
data() {
return {
menu: [
{
id: 1,
label: "Admin",
nodes: [
{
id: 2,
label: "Assets",
nodes: [
{
id: 3,
label: "CSS",
nodes: [
{
id: 4,
label: "Css One",
},
{
id: 5,
label: "Css Two",
},
],
},
{
id: 6,
label: "Js",
nodes: [
{
id: 7,
label: "Js One",
},
{
id: 8,
label: "Js Two",
},
],
},
{
id: 9,
label: "Scss",
nodes: [
{
id: 10,
label: "Sub Child",
nodes: [
{
id: 11,
label: "Sub File",
},
{
id: 12,
label: "Sub File",
},
],
},
{
id: 13,
label: "Scss Two",
},
],
},
],
},
{
id: 14,
label: "Default",
nodes: [
{
id: 15,
label: "Dashboard",
},
{
id: 16,
label: "Typography",
},
],
},
],
},
{
id: 17,
label: "index file",
},
],
};
},
};
Installing and usage
npm i @kyvg/vue3-notification
In your plugins/main.js file all the following code:
import Notifications from '@kyvg/vue3-notification'
.use(Notifications)
Inside Your template tags add
<div class="row">
<label class="col-xl-2 col-sm-12 col-md-12 col-form-label">Placement</label>
<div class="col-xl-4 col-sm-12 col-md-6 mb-4">
<select v-model="enternotify" @change="selectnotify" class="form-select form-control" id="bootstrap-notify-placement-from">
<option v-for="(anim, index) in notifyList" :value="anim.position" :key="index">{{ anim.position }}</option >
</select >
</div >
</div >
<div class="row">
<label class="col-xl-2 col-sm-12 col-md-12 col-form-label">Icon</label>
<div class="col-xl-4 col-md-12 col-sm-12 mb-4">
<select v-model="entericon" @change="selectnotify" class="form-select form-control" id="bootstrap-notify-placement-from">
<option v-for="(anim, index) in notifyList" :value="anim.icon" :key="index">{{ anim.icon }}</option>
</select>
</div>
</div>
<notifications :position="enternotify" :key="index" >
<template #body="props" >
<div class="vue-notification"> <i :class="entericon"></i>
<p class="title">
{{ props.item.title }}
</p>
</div>
</template>
</notifications>
<button class="btn btn-primary" id="bootstrap-notify-gen-btn" @click.prevent="showNotify"> show notify</button>
Inside Your script tags add
export default {
components:{
},
data(){
return{
enternotify: "top left",
entericon:"none",
notifyList: [
{icon:"none"},
{position:"top left",icon:"fa fa-check-square"},
{position:"top right", icon:"fa fa-warning"},
{position:"bottom left",icon:"fa fa-cloud-download"},
{position:"bottom right",icon:"fa fa-unlock-alt"},
],
}
},
methods:{
selectnotify() {
},
showNotify(){
this.$notify({
color:"secondary",
title: "New Order has been placed",
});
},
}
}
Installing and usage
npm i vue-star-rating
Inside Your template tags add
<star-rating :show-rating="false" :star-size="20" :max-rating="10" @update:rating="rating = $event"></star-rating>
<pre class="mb-0 rating-pre"> Rating {{rating}}</pre>
Inside Your script tags add
import StarRating from 'vue-star-rating';
export default {
components:{
StarRating,
},
data(){
return{
rating: "0",
rating1:"0",
rating2:"0",
disabled: false
}
},
methods:{
currentRating() {
return this.rating
},
currentRatingText1() {
return this.rating1
},
currentRatingText() {
return this.rating2
}
}
}
Installing and usage
npm i dropzone-vue
Inside Your template tags add
<DropZone
:maxFileSize="Number(60000000)"
:uploadOnDrop="true"
:dropzoneMessageClassName="customClass">
</DropZone>
Inside Your script tags add
import DropZone from "dropzone-vue";
export default {
components:{
DropZone
},
}
Inside Your style tags add
@import 'dropzone-vue/dist/dropzone-vue.common.css';
Installing and usage
npm i vue3-tour
In your plugins/main.js file all the following code:
import Vue3Tour from 'vue3-tour'
import 'vue3-tour/dist/vue3-tour.css'
.use(Vue3Tour)
Inside Your template tags add
<div class="avatar" id="profile-tour"><img alt="" src="../../../assets/images/user/7.jpg" ></div>
<div class="icon-wrapper" id="update-profile-tour"><i class="icofont icofont-pencil-alt-5" data-intro="Change Profile image here"></i></div>
<v-tour name="myTour" :steps="steps" :options="tourOptions"></v-tour>
Inside Your script tags add
export default {
data() {
return{
tourOptions: {
useKeyboardNavigation: true,
labels: {
buttonSkip: "Skip",
buttonPrevious: "Back",
buttonNext: "Next",
buttonStop: "Done",
},
},
steps: [
{
target: "#profile-tour",
content: "This is Profile image",
},
{
target: "#update-profile-tour",
content: "Change Profile image here",
},
],
}
}
mounted: function () {
this.$tours["myTour"].start();
},
}
Installing and usage
npm i vue-sweetalert2
In your plugins/main.js file all the following code:
import VueSweetalert2 from 'vue-sweetalert2';
import 'sweetalert2/dist/sweetalert2.min.css';
.use(VueSweetalert2)
Inside Your template tags add
<button class="btn btn-success sweet-12" type="button" v-on:click="advanced_success_alert" >Success</button>
Inside Your script tags add
export default {
methods:{
advanced_success_alert:function(){
this.$swal({
text:'A wild Pikachu appeared! What do you want to do?',
showCancelButton: true,
confirmButtonText: 'Throw Pokéball!',
confirmButtonColor: '#4466f2',
cancelButtonText: 'Defeat',
cancelButtonColor: '#4466f2',
}).then((result)=>{
if(result.value){
this.$swal({
title:'Gotcha!',
text:'Pikachu was caught!',
type:'success'
});
}else{
this.$swal({
text:'Pikachu fainted! You gained 500 XP!'
});
}
});
},
}
}
Inside Your template tags add
<div class="mb-2 me-2 mb-0 animated-modal-md-mb w-auto">
<label class="me-3">Entrances</label>
<select class="form-select" id="entrance" v-model="enterAnimation" >
<option v-for="(anim, index) in animationList" :value="anim" :key="index">{{ anim }}</option>
</select>
</div>
<div class="mb-2 me-2 mb-0 animated-modal-md-mb w-auto">
<label class="me-3">Exits</label>
<select class="form-select" id="exit" v-model="exitAnimation">
<option v-for="(anim, index) in animationList" :value="anim" :key="index">{{anim}}</option>
</select>
</div>
<button class="btn btn-primary" type="button" data-bs-toggle="modal" data-bs-target="#myModal" @click.prevent="isActive(this.enterAnimation)">Launch demo modal</button>
<Teleport to="body">
<div class="modal fade" @click="close" id="myModal" role="dialog" :style="{ marginRight: animate == rubberBand ? '15px' : '0px' }">
<div id="mod" class="modal-dialog" role="document">
<div>
<button class="btn-close theme-close" type="button" @click="close"></button>
<div class="modal-body">
<div class="card">
<div class="animate-widget">
<div><img class="img-fluid" src="../../../assets/images/banner/3.jpg" alt=""></div>
<div class="text-center p-25">
<p class="text-muted mb-0">asdasdsadsad pleasure and praising pain was born and I will give you a complete account of the system, and expound the actual teachings</p>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</Teleport>
Inside Your script tags add
import animatedModal from "@/mixins/animatedModal";
export default {
mixins: [animatedModal],
name: "VueAnimate",
};
Inside Your mixin tags add
const animatedModal = {
data() {
return {
msg: "Welcome to Your Vue.js App",
enterAnimation:'bounceIn',
exitAnimation:'flipOutX',
animate: false,
active: false,
animationList: [
"bounce",
"flash",
"flip",
"headShake",
"hinge",
"jello",
"pulse",
"rubberBand",
"shake",
"swing",
"tada",
"wobble",
"bounceIn",
"bounceInDown",
"bounceInLeft",
"bounceInRight",
"bounceInUp",
"fadeIn",
"fadeInDown",
"fadeInDownBig",
"fadeInLeft",
"fadeInLeftBig",
"fadeInRight",
"fadeInRightBig",
"fadeInUp",
"fadeInUpBig",
"flipInX",
"flipInY",
"lightSpeedIn",
"rollIn",
"rotateIn",
"rotateInDownLeft",
"rotateInDownRight",
"rotateInUpLeft",
"rotateInUpRight",
"slideInDown",
"slideInLeft",
"slideInRight",
"slideInUp",
"zoomIn",
"zoomInDown",
"zoomInLeft",
"zoomInRight",
"zoomInUp",
"bounceOut",
"bounceOutDown",
"bounceOutLeft",
"bounceOutRight",
"bounceOutUp",
"fadeOut",
"fadeOutDown",
"fadeOutDownBig",
"fadeOutLeft",
"fadeOutLeftBig",
"fadeOutRight",
"fadeOutRightBig",
"fadeOutUp",
"fadeOutUpBig",
"flipOutX",
"flipOutY",
"lightSpeedOut",
"rollOut",
"rotateOut",
"rotateOutDownLeft",
"rotateOutDownRight",
"rotateOutUpLeft",
"rotateOutUpRight",
"slideOutDown",
"slideOutLeft",
"slideOutRight",
"slideOutUp",
"slideOutRight",
"zoomOut",
"zoomOutDown",
"zoomOutLeft",
"zoomOutRight",
"zoomOutUp"
]
};
},
methods: {
isActive(path) {
this.animate = path
document.getElementById("mod").className = `modal-dialog ${path} animated`
},
close() {
document.getElementById("mod").className = `modal-dialog ${this.exitAnimation} animated`
},
},
computed: {
enterClass() {
return `animated ${this.enterAnimation}`;
}
}
}
export default animatedModal
Installing and usage
npm i swiper
Inside Your template tags add
<swiper
:autoHeight="true"
:slidesPerView="5"
:spaceBetween="30"
:pagination="{
clickable: true,
}"
:modules="modules"
class="mySwiper"
>
<swiper-slide v-for="item in owlcarousel" :key="item">
<div class="item"><img :src="getImageUrl(item.img)" style="height:200px; width: 294.2px; border-radius: 5px;" alt=""></div>
</swiper-slide>
</swiper>
Inside Your script tags add
import { Swiper, SwiperSlide } from "swiper/vue";
import "swiper/css";
import "swiper/css/pagination";
import { Pagination } from "swiper";
import { mapState } from "vuex";
export default {
components: {
Swiper,
SwiperSlide,
},
data(){
return{
}
},
computed: {
...mapState({
owlcarousel:(state)=>state.owlcarousel.items,
}),
},
methods: {
getImageUrl(path) {
return require("@/assets/images/slider/" + path);
},
},
setup() {
return {
modules: [Pagination],
};
},
}
Inside Your json tags add
{
"items":[
{"img":"1.jpg"},
{"img":"1.jpg"},
{"img":"2.jpg"},
{"img":"3.jpg"},
{"img":"4.jpg"},
{"img":"5.jpg"},
{"img":"6.jpg"},
{"img":"7.jpg"},
{"img":"8.jpg"},
{"img":"9.jpg"},
{"img":"10.jpg"},
{"img":"11.jpg"}
]
}
Inside Your store js tags add
import owlcarousel from "../../data/owlcarousel"
const state = {
items : owlcarousel.items
};
export default {
namespaced: true,
state,
}
Installing and usage
npm i vue-slider-component
Inside Your template tags add
<VueSlider v-model="one.value" :data="one.data" :marks="true" :tooltip="'always'" :tooltip-placement="'top'" ></VueSlider>
Inside Your script tags add
import VueSlider from 'vue-slider-component'
import 'vue-slider-component/theme/antd.css'
export default {
components:{
VueSlider
},
data() {
return{
one:{
value:10,
data:[10,100]
},
}
}
}
Installing and usage
npm i vue-cropperjs
Inside Your template tags add
<vue-cropper
ref="cropper"
:guides="true"
:view-mode="viewmodeselected"
drag-mode="crop"
:aspectRatio="aspectRatioselected"
:auto-crop-area="0.5"
:min-container-width="250"
:min-container-height="180"
:background="true"
:rotatable="true"
:movable="true"
:src="getImgUrl()"
alt="Source Image"
:ready="ready"
:crop="cropImage"
:img-style="{ width: '800px', height: '500px' }">
</vue-cropper>
Inside Your script tags add
import VueCropper from 'vue-cropperjs';
import 'cropperjs/dist/cropper.css';
export default {
components: {
VueCropper,
},
data(){
return{
myimgSrc:'img-cropper.jpg',
imgSrc:'',
imageData:'',
containerData:'',
putData:'',
viewmodeselected:0,
cropImg: '',
viewmodeOptions: [
{ text: 'VM0', value: 0 },
{ text: 'VM1', value: 1 },
{ text: 'VM2', value: 2 },
{ text: 'VM3', value: 3 },
],
aspectRatioselected:1.7777777777777777,
aspectRatioOptions: [
{ text: '16:9', value: 1.7777777777777777 },
{ text: '4:3', value: 1.3333333333333333 },
{ text: '1:1', value: 1 },
{ text: '2:3', value: 0.6666666666666666 },
{ text: 'Free', value: NaN }
]
};
},
}
Inside Your template tags add
<h5>Sticky Note <a class="btn btn-primary pull-right m-l-10" id="add_new" href="javascript:;" v-on:click="addNewSticky">Add New Note</a></h5>
<div class="note" v-for="(n,index) in sticky_notes" :key="index">
<a v-on:click="removeSticky(index)" class="button remove">X</a>
<div class="note_cnt">
<textarea class="title" placeholder="Enter note title" style="height: 64px;" v-text="n.title"></textarea>
<textarea class="cnt" placeholder="Enter note description here" style="height: 200px;" v-text="n.description"></textarea>
</div>
</div>
Inside Your script tags add
export default {
data(){
return{
sticky_notes:[]
};
},
mounted(){
this.sticky_notes.push({ title:'',description:'' });
},
methods:{
addNewSticky:function() {
this.sticky_notes.push({ title:'',description:'' });
},
removeSticky:function(index) {
this.sticky_notes.splice(index,1);
}
}
}
Inside Your template tags add
<div class="mb-2 me-2 mb-0 animated-modal-md-mb w-auto">
<label class="me-3">Entrances</label>
<select class="form-select" id="entrance" v-model="enterAnimation" >
<option v-for="(anim, index) in animationList" :value="anim" :key="index">{{ anim }}</option>
</select>
</div>
<div class="mb-2 me-2 mb-0 animated-modal-md-mb w-auto">
<label class="me-3">Exits</label>
<select class="form-select" id="exit" v-model="exitAnimation">
<option v-for="(anim, index) in animationList" :value="anim" :key="index">{{anim}}</option>
</select>
</div>
<button class="btn btn-primary" type="button" data-bs-toggle="modal" data-bs-target="#myModal" @click.prevent="isActive(this.enterAnimation)">Launch demo modal</button>
<Teleport to="body">
<div class="modal fade" @click="close" id="myModal" role="dialog" :style="{ marginRight: animate == rubberBand ? '15px' : '0px' }">
<div id="mod" class="modal-dialog" role="document">
<div>
<button class="btn-close theme-close" type="button" @click="close"></button>
<div class="modal-body">
<div class="card">
<div class="animate-widget">
<div><img class="img-fluid" src="../../../assets/images/banner/3.jpg" alt=""></div>
<div class="text-center p-25">
<p class="text-muted mb-0">asdasdsadsad pleasure and praising pain was born and I will give you a complete account of the system, and expound the actual teachings</p>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</Teleport>
Inside Your script tags add
import animatedModal from "@/mixins/animatedModal";
export default {
mixins: [animatedModal],
name: "VueAnimate",
};
Inside Your mixin tags add
const animatedModal = {
data() {
return {
msg: "Welcome to Your Vue.js App",
enterAnimation:'bounceIn',
exitAnimation:'flipOutX',
animate: false,
active: false,
animationList: [
"bounce",
"flash",
"flip",
"headShake",
"hinge",
"jello",
"pulse",
"rubberBand",
"shake",
"swing",
"tada",
"wobble",
"bounceIn",
"bounceInDown",
"bounceInLeft",
"bounceInRight",
"bounceInUp",
"fadeIn",
"fadeInDown",
"fadeInDownBig",
"fadeInLeft",
"fadeInLeftBig",
"fadeInRight",
"fadeInRightBig",
"fadeInUp",
"fadeInUpBig",
"flipInX",
"flipInY",
"lightSpeedIn",
"rollIn",
"rotateIn",
"rotateInDownLeft",
"rotateInDownRight",
"rotateInUpLeft",
"rotateInUpRight",
"slideInDown",
"slideInLeft",
"slideInRight",
"slideInUp",
"zoomIn",
"zoomInDown",
"zoomInLeft",
"zoomInRight",
"zoomInUp",
"bounceOut",
"bounceOutDown",
"bounceOutLeft",
"bounceOutRight",
"bounceOutUp",
"fadeOut",
"fadeOutDown",
"fadeOutDownBig",
"fadeOutLeft",
"fadeOutLeftBig",
"fadeOutRight",
"fadeOutRightBig",
"fadeOutUp",
"fadeOutUpBig",
"flipOutX",
"flipOutY",
"lightSpeedOut",
"rollOut",
"rotateOut",
"rotateOutDownLeft",
"rotateOutDownRight",
"rotateOutUpLeft",
"rotateOutUpRight",
"slideOutDown",
"slideOutLeft",
"slideOutRight",
"slideOutUp",
"slideOutRight",
"zoomOut",
"zoomOutDown",
"zoomOutLeft",
"zoomOutRight",
"zoomOutUp"
]
};
},
methods: {
isActive(path) {
this.animate = path
document.getElementById("mod").className = `modal-dialog ${path} animated`
},
close() {
document.getElementById("mod").className = `modal-dialog ${this.exitAnimation} animated`
},
},
computed: {
enterClass() {
return `animated ${this.enterAnimation}`;
}
}
}
export default animatedModal
Installing and usage
npm i vue-aos
In your plugins/main.js file all the following code:
import AosVue from "aos-vue";
.use(AosVue)
Inside Your template tags add
<figure v-masonry-tile class="grid-item col-sm-4 col-md-3" v-for="(src, index) in imgs" :key="index" @click="() => showImg(index)" >
<aos-vue :animation="src.animation">
<a>
<img :src="require('../../../assets/images/masonry/'+src.image)" alt="Image description" class="img-thumbnail" />
</a>
</aos-vue>
</figure>
<vue-easy-lightbox
:visible="visible"
:imgs="lightBoxImages"
@hide="handleHide">
</vue-easy-lightbox>
Inside Your script tags add
import aosExample from "@/mixins/aosExample";
export default {
mixins: [aosExample],
methods: {
showImg (index) {
this.index = index
this.visible = true
},
handleHide () {
this.visible = false
},
},
mounted(){
this.imgs.forEach(item=>{
this.lightBoxImages.push(require('@/assets/images/masonry/'+item.image))
this.lightBoxTitle.push(item.title)
})
}
};
Inside Your mixin tags add
const aosExample = {
data(){
return{
lightBoxImages:[],
lightBoxTitle:[],
visible: false,
imgs: [
{ image:'1.jpg', animation:"fade-down"},
{image:'2.jpg', animation:"zoom-out-down"},
{ image:'3.jpg', animation:"flip-down"},
{image:'4.jpg',animation:"fade-up" },
{image:'5.jpg',animation:"flip-down" },
{ image:'6.jpg', animation:"fade-up" },
{ image:'7.jpg', animation:"flip-down" },
{ image:'8.jpg', animation:"fade-up"},
{ image:'9.jpg', animation:"flip-down" },
{ image:'10.jpg', animation:"fade-up" },
{ image:'11.jpg', animation:"flip-down" },
{ image:'12.jpg', animation:"fade-up" },
{ image:'14.jpg', animation:"flip-down" },
{ image:'15.jpg', animation:"flip-left" },
{ image:'13.jpg', animation:"flip-down" },
{ image:'4.jpg', animation:"zoom-out" },
{ image:'5.jpg', animation:"flip-right" },
{ image:'6.jpg', animation:"zoom-out" },
{ image:'7.jpg', animation:"zoom-out-up" },
{ image:'8.jpg', animation:"zoom-out-down" },
{ image:'9.jpg', animation:"flip-down" },
{ image:'10.jpg', animation:"slide-up" },
{ image:'9.jpg', animation:"flip-down" },
{ image:'10.jpg', animation:"fade-up" },
{ image:'11.jpg', animation:"flip-down" },
{ image:'12.jpg', animation:"fade-up" },
{ image:'14.jpg', animation:"flip-down" },
{ image:'15.jpg', animation:"flip-left" },
{ image:'13.jpg', animation:"flip-down" },
{ image:'4.jpg', animation:"zoom-out" },
{ image:'5.jpg', animation:"flip-right" },
{ image:'6.jpg', animation:"zoom-out" },
{ image:'7.jpg', animation:"zoom-out-up" }
]
}
},
}
export default aosExample
To use another types button you have to link the related css file according to types of buttons in a head tag
Installing and usage
npm i vue3-datepicker
In your plugins/main.js file all the following code:
import Datepicker from '@vuepic/vue-datepicker';
import '@vuepic/vue-datepicker/dist/main.css'
.component('Datepicker', Datepicker)
Inside Your template tags add
<datepicker datepicker class=" datetimepicker-input digits" v-model="date" :format="format" />
Inside Your script tags add
import { ref } from 'vue';
export default {
setup() {
const date = ref();
// In case of a range picker, you'll receive [Date, Date]
const format = (date) => {
const day = date.getDate();
const month = date.getMonth() + 1;
const year = date.getFullYear();
return ` ${day}/${month}/${year}`;
}
return {
date,
format,
}
}
}
Installing and usage
npm i vue3-simple-typeahead
In your plugins/main.js file all the following code:
import SimpleTypeahead from 'vue3-simple-typeahead';
import 'vue3-simple-typeahead/dist/vue3-simple-typeahead.css';
.use(SimpleTypeahead)
Inside Your template tags add
<vue3-simple-typeahead :items="list" class="form-control typeahead form-control" :placeholder="options.placeholder" @selectItem="selectItem" @onInput="onInput" @onBlur="onBlur" :minInputLength="options.minInputLength" />
Inside Your script tags add
export default {
created() {
this.listFiltered = this.list;
},
data() {
return {
options: {
placeholder: 'States of USA',
minInputLength: 1,
},
list: [
'alabama',
'alaska',
'arizona',
'arkansas',
'california',
'colorado',
'connecticut',
'delaware',
'florida',
'georgia',
'hawaii',
'idaho',
'illinois',
'indiana',
'iowa',
'kansas',
'kentucky',
'louisiana',
'maine',
'maryland',
'massachusetts',
'michigan',
'minnesota',
'mississippi',
'missouri',
'montana',
'nebraska',
'nevada',
'new hampshire',
'new jersey',
'new mexico',
'new york',
'north carolina',
'north dakota',
'ohio',
'oklahoma',
'oregon',
'pennsylvania',
'rhode island', Inside Your template tags add
'south carolina',
'south dakota',
'tennessee',
'texas',
'utah',
'vermont',
'virginia',
'washington',
'west virginia',
'wisconsin',
'wyoming'
],
listFiltered: [],
};
},
methods: {
selectItem(item) {
this.data.selection = item;
},
onInput(event) {
this.data.selection = null;
this.data.input = event.input;
this.listFiltered = event.items;
},
onBlur(event) {
this.data.input = event.input;
this.listFiltered = event.items;
},
},
}
Inside Your template tags add
<div class="table-responsive">
<table class="table">
<thead>
<tr class="border-bottom-primary">
<th scope="col">Id</th>
<th scope="col">First Name</th>
<th scope="col">Last Name</th>
<th scope="col">Username</th>
<th scope="col">Designation</th>
<th scope="col">Company</th>
<th scope="col">Language</th>
<th scope="col">Country</th>
</tr>
</thead>
<tbody >
<tr :class="data.borderColor" v-for="data in bootstraplist" :key="data">
<th scope="row">{{data.id}}</th>
<td><img :src="getImgUrl(data.img)" alt="" class="img-fluid me-2 rounded-pill">{{data.firstName}}</td>
<td>{{data.lastName}}</td>
<td>{{data.userName}}</td>
<td>{{data.role}}</td>
<td>{{data.company}}</td>
<td>
<div class="badge " :class="data.badgeClass">
{{data.language}}
</div>
</td>
<td>{{data.country}}</td>
</tr>
</tbody>
</table>
</div>
Inside Your script tags add
import { mapState } from 'vuex';
export default {
computed: {
...mapState({
bootstraplist: state => state.bootstrap.tableData1,
})
},
methods:{
getImgUrl(path) {
return require('@/assets/images/avtar/'+path);
},
}
}
Inside Your json tags add
{
"tableData1":[
{
"id": 1,
"img": "boy.png",
"firstName": "Ram Jacob",
"lastName": "Wolfe",
"userName": "RamJacob@twitter",
"role": "Developer",
"company": "Apple Inc.",
"language": "Php",
"badgeClass": "badge-light-primary",
"credit": "$3500.00",
"borderColor": "border-bottom-secondary",
"country": "IND"
},
{
"id": 2,
"img": "man.png",
"firstName": "John Deo",
"lastName": "Gummer",
"userName": "JohnDeo@twitter",
"role": "Designer",
"company": "Hewlett packard",
"language": "Html",
"badgeClass": "badge-light-success",
"credit": "$2400.00",
"borderColor": "border-bottom-success",
"country": "US"
},
{
"id": 3,
"img": "girl.png",
"firstName": "Elana John",
"lastName": "Cazale",
"userName": "ElanaJohn@twitter",
"role": "Designer",
"company": "Microsoft",
"language": "Pug",
"badgeClass": "badge-light-primary",
"credit": "$2560.00",
"borderColor": "border-bottom-info",
"country": "UK"
},
{
"id": 4,
"img": "chat-user-1.png",
"firstName": "Meryl Streep",
"lastName": "Roberts",
"userName": "MerylStreep@twitter",
"role": "Developer",
"company": "Tata Ltd.",
"language": "React",
"badgeClass": "badge-light-success",
"credit": "$1870.00",
"borderColor": "border-bottom-warning",
"country": "IDN"
},
{
"id": 5,
"img": "woman.png",
"firstName": "Emma Stone",
"lastName": "Stone",
"userName": "EmmaStone@twitter",
"role": "Developer",
"company": "Wipro Ltd.",
"badgeClass": "badge-light-primary",
"language": "Vue",
"credit": "$4580.00",
"borderColor": "border-bottom-danger",
"country": "IRN"
},
{
"id": 6,
"img": "girl.png",
"firstName": "Eliana Jons",
"lastName": "Jons",
"userName": "ElianaJons@twitter",
"role": "Developer",
"company": "Info Ltd.",
"badgeClass": "badge-light-primary",
"language": "Vue",
"credit": "$4580.00",
"borderColor": "border-bottom-light",
"country": "IRN"
}
],
}
Inside Your store js tags add
import bootstrap from "../../data/bootstrap.json"
const state = {
tableData1 : bootstrap.tableData1,
};
export default {
namespaced: true,
state,
};
Installing and usage
npm i vue3-apexcharts
In your plugins/main.js file all the following code:
import VueApexCharts from "vue3-apexcharts";
.use(VueApexCharts)
Inside Your template tags add
<apexchart
type="area"
height="350"
ref="chart"
:options="chartOptions"
:series="series">
<apexchart>
Inside Your script tags add
var primary = localStorage.getItem('primary_color') || '#6362e7';
var secondary = localStorage.getItem('secondary_color') || '#ffc500';
export default {
data() {
return {
series: [
{
name: "series1",
data: [31, 40, 28, 51, 42, 109, 100],
},
{
name: "series2",
data: [11, 32, 45, 32, 34, 52, 41],
},
],
chartOptions: {
chart: {
height: 350,
type: "area",
toolbar: {
show: false,
},
},
dataLabels: {
enabled: false,
},
stroke: {
curve: "smooth",
},
xaxis: {
type: "datetime",
categories: [
"2018-09-19T00:00:00",
"2018-09-19T01:30:00",
"2018-09-19T02:30:00",
"2018-09-19T03:30:00",
"2018-09-19T04:30:00",
"2018-09-19T05:30:00",
"2018-09-19T06:30:00",
],
},
tooltip: {
x: {
format: "dd/MM/yy HH:mm",
},
},
colors: [primary, secondary],
},
};
},
}
Installing and usage
npm i vue-google-charts
Inside Your template tags add
<GChart
class="chart-overflow"
id="line-chart"
type="LineChart"
:data="line_chart.chartData_1"
:options="line_chart.options_1" />
Inside Your script tags add
var primary = localStorage.getItem('primary_color') || '#6362e7';
var secondary = localStorage.getItem('secondary_color') || '#ffc500';
import { GChart } from "vue-google-charts";
export default {
components:{
GChart
},
data(){
return{
chartsLib: null,
line_chart: {
chartData_1: [
['Month', 'Guardians of the Galaxy', 'The Avengers','Transformers: Age of Extinction'],
[1, 37.8, 80.8, 41.8],
[2, 30.9, 10.5, 32.4],
[3, 40.4, 57, 25.7],
[4, 11.7, 18.8, 10.5],
[5, 20, 17.6, 10.4],
[6, 8.8, 13.6, 7.7],
[7, 7.6, 12.3, 9.6],
[8, 12.3, 29.2, 10.6],
[9, 16.9, 42.9, 14.8],
[10, 12.8, 30.9, 11.6],
[11, 5.3, 7.9, 4.7],
[12, 6.6, 8.4, 5.2],
],
options_1: {
chart: {
title: 'Box Office Earnings in First Two Weeks of Opening',
subtitle: 'in millions of dollars (USD)'
},
colors: [primary , secondary , "#51bb25"],
height: 500,
width:'100%',
}
},
}
},
}
Installing and usage
npm i vue-chartist
In your plugins/main.js file all the following code:
import vueChartist from "vue-chartist";
.use(vueChartist)
Inside Your template tags add
<chartist
class="ct-6 flot-chart-container"
ratio="ct-major-second"
type="Line"
:data="chart1.data"
:options="chart1.options"
:event-handlers="chart1.eventHandlers">
<chartist>
Inside Your script tags add
var seq = 0;
var delays = 80;
var durations = 500;
export default {
data(){
return{
chart1 : {
data: {
labels: ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12'],
series: [
[12, 9, 7, 8, 5, 4, 6, 2, 3, 3, 4, 6],
[4, 5, 3, 7, 3, 5, 5, 3, 4, 4, 5, 5],
[5, 3, 4, 5, 6, 3, 3, 4, 5, 6, 3, 4],
[3, 4, 5, 6, 7, 6, 4, 5, 6, 7, 6, 3]
]
},
options: {
low: 0,
showArea: false,
fullWidth: true,
},
eventHandlers : [{
event: 'draw',
fn(data) {
seq++;
if(data.type === 'line') {
data.element.animate({
opacity: {
begin: seq * delays + 1000,
dur: durations,
from: 0,
to: 1
}
});
} else if(data.type === 'label' && data.axis === 'x') {
data.element.animate({
y: {
begin: seq * delays,
dur: durations,
from: data.y + 100,
to: data.y,
easing: 'easeOutQuart'
}
});
} else if(data.type === 'label' && data.axis === 'y') {
data.element.animate({
x: {
begin: seq * delays,
dur: durations,
from: data.x - 100,
to: data.x,
easing: 'easeOutQuart'
}
});
} else if(data.type === 'point') {
data.element.animate({
x1: {
begin: seq * delays,
dur: durations,
from: data.x - 10,
to: data.x,
easing: 'easeOutQuart'
},
x2: {
begin: seq * delays,
dur: durations,
from: data.x - 10,
to: data.x,
easing: 'easeOutQuart'
},
opacity: {
begin: seq * delays,
dur: durations,
from: 0,
to: 1,
easing: 'easeOutQuart'
}
});
} else if(data.type === 'grid') {
var pos1Animation = {
begin: seq * delays,
dur: durations,
from: data[data.axis.units.pos + '1'] - 30,
to: data[data.axis.units.pos + '1'],
easing: 'easeOutQuart'
};
var pos2Animation = {
begin: seq * delays,
dur: durations,
from: data[data.axis.units.pos + '2'] - 100,
to: data[data.axis.units.pos + '2'],
easing: 'easeOutQuart'
};
var animations = {};
animations[data.axis.units.pos + '1'] = pos1Animation;
animations[data.axis.units.pos + '2'] = pos2Animation;
animations['opacity'] = {
begin: seq * delays,
dur: durations,
from: 0,
to: 1,
easing: 'easeOutQuart'
};
data.element.animate(animations);
}
}
}]
},
}
}
}
Installing and usage
npm i vue3-google-map
Inside Your template tags add
<GoogleMap :center="{lat:20.5937, lng:78.9629}" :zoom="12" style="width: auto; height: 500px"><GoogleMap>
Inside Your script tags add
import { GoogleMap, Marker } from "vue3-google-map";
Installing and usage
npm i @vue-leaflet/vue-leaflet
Inside Your template tags add
<l-map :zoom="simple.zoom" :center="simple.center" style="height: 500px">
<l-tile-layer :url="simple.url"><l-tile-layer>
<l-map>
Inside Your script tags add
import "leaflet/dist/leaflet.css";
import { LMap, LTileLayer } from "@vue-leaflet/vue-leaflet";
export default {
components:{
LMap,
LTileLayer
},
data(){
return{
simple:{
zoom:5,
center: [49.439557, 234.558105],
url:'http://{s}.tile.osm.org/{z}/{x}/{y}.png',
},
}
}
}
Installing and usage
npm i vue3-quill
In your plugins/main.js file all the following code:
import { quillEditor } from "vue3-quill";
.use(quillEditor)
Inside Your template tags add
<quill-editor
v-model:value="state.content"
:options="state.editorOption"
@blur="onEditorBlur($event)"
@focus="onEditorFocus($event)"
@ready="onEditorReady($event)"
@change="onEditorChange($event)" />
Inside Your script tags add
import { reactive } from 'vue'
export default {
setup() {
const state = reactive({
content: 'Some initial content
',
_content: '',
editorOption: {
placeholder: 'core',
},
disabled: false
})
const onEditorBlur = (quill) => {
}
const onEditorFocus = (quill) => {
}
const onEditorReady = (quill) => {
}
const onEditorChange = ({ quill, html, text }) => {
state._content = html
}
setTimeout(() => {
state.disabled = true
}, 2000)
return { state, onEditorBlur, onEditorFocus, onEditorReady, onEditorChange }
},
};
Installing and usage
npm i @ckeditor/ckeditor5-vue
Inside Your template tags add
<ckeditor :editor="editor" v-model="editorData"><ckeditor>
Inside Your script tags add
import CKEditor from '@ckeditor/ckeditor5-vue';
import ClassicEditor from '@ckeditor/ckeditor5-build-classic';
export default {
components: {
ckeditor: CKEditor.component
},
data() {
return {
editor: ClassicEditor,
editorData: 'Lorem Ipsum is simply dummy text of the printing and typesetting industry.
Lorem Ipsum has been the industry\'s standard dummy text ever since the 1500s, when an
unknown printer took a galley of type and scrambled it to make a type specimen book.
It has survived not only five centuries, but also the leap into electronic typesetting,
remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset
sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.
'
};
}
}