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";
<button class="btn btn-primary" >Primary</button>
<button class="btn btn-secondary" >Secondary</button>
<button class="btn btn-success" >Success</button>
<button class="btn btn-info" >Info</button>
<button class="btn btn-warning" >Warning</button>
<button class="btn btn-danger" >Danger</button>
To use another types button you have to link the related css file according to types of buttons in a head tag
<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>
<div class="progress">
<div class="progress-bar" role="progressbar" aria-valuenow="0" aria-valuemin="0" aria-valuemax="100" ></div>
</div>
<div class="progress">
<div class="progress-bar bg-primary" role="progressbar" style="width: 25%" aria-valuenow="25" aria-valuemin="0" aria-valuemax="100" ></div>
</div>
<div class="progress">
<div class="progress-bar bg-secondary" role="progressbar" style="width: 50%" aria-valuenow="50" aria-valuemin="0" aria-valuemax="100" ></div>
</div>
<div class="progress">
<div class="progress-bar bg-success" role="progressbar" style="width: 75%" aria-valuenow="75" aria-valuemin="0" aria-valuemax="100" ></div>
</div>
<div class="progress">
<div class="progress-bar bg-info" role="progressbar" style="width: 100%" aria-valuenow="100" aria-valuemin="0" aria-valuemax="100" ></div>
</div>
<div class="alert alert-primary" role="alert">
<p >This is a primary alert—check it out!</p>
</div>
<div class="alert alert-secondary" role="alert">
<p >This is a primary alert—check it out!</p>
</div>
<div class="alert alert-success" role="alert">
<p >This is a primary alert—check it out!</p>
</div>
<div class="alert alert-info" role="alert">
<p >This is a primary alert—check it out!</p>
</div>
<div class="alert alert-warning" role="alert">
<p >This is a primary alert—check it out!</p>
</div>
<div class="alert alert-danger" role="alert">
<p >This is a primary alert—check it out!</p>
</div>
<div class="alert alert-light" role="alert">
<p >This is a primary alert—check it out!</p>
</div>
<div class="alert alert-dark" role="alert">
<p >This is a primary alert—check it out!</p>
</div>
Inside Your template tags add
<button class="btn btn-primary example-popover" type="button" ref="tolek" 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 class="example-popover btn btn-primary" tabindex="0" role="button" ref="tole" 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?">Click to toggle popover</a>
<button class="example-popover btn btn-primary" type="button" ref="to" data-bs-trigger="hover" 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.">Click to toggle popover</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']",
}),
}
}
<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
<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>
<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">
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.
</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">
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.
</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">
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.
</div>
</div>
</div>
</div>
This is an Vue wrapper library for the Perfect Scrollbar. To use this library you should get familiar with the Perfect Scrollbar documentation as well since this documentation only explains details specific to this wrapper.
Installing and usagenpm 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 @meforma/vue-toaster
In your plugins/main.js file all the following code:
import Toaster from "@meforma/vue-toaster";
.use(Toaster)
Inside Your template tags add
<button class="btn btn-success " type="button" @click="success" variant="success" >Success</button>
Inside Your script tags add
export default {
methods:{
success() {
this.$toast.show(' New order has been placed ', { theme: 'outline',position: 'top-right', type: 'success', duration: 2000 });
},
}
}
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
<img src="../../../assets/images/banner/3.jpg" alt="girl" width="800" height="600" >
<a class="icon-wrapper" id="update-profile-tour" href="edit-profile.html" >
<i class="icofont icofont-pencil-alt-5" ></i>
</a>
<v-tour class="scrollbar-margins large-margin scroll-demo p-0" v-once :settings="settings"></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: "#update-profile-tour",
content: "Change Profile image here",
},
],
}
}
mounted: function () {
this.$tours["myTour"].start();
},
}
Installing and usage
npm install vue-star-rating@next
Inside Your template tags add
<star-rating :show-rating="false" :star-size="20" :max-rating="10" @update:rating="rating1 = $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:{
currentRatingText() {
return this.rating
},
}
<nav aria-label="Page navigation example" >
<ul class="pagination pagination-primary" >
<li class="page-item"><a class="page-link" href="javascript:void(0)" >Previous</a></li>
<li class="page-item"><a class="page-link" href="javascript:void(0)" >1</a></li>
<li class="page-item"><a class="page-link" href="javascript:void(0)" >2</a></li>
<li class="page-item"><a class="page-link" href="javascript:void(0)" >3</a></li>
<li class="page-item"><a class="page-link" href="javascript:void(0)" >Next</a></li>
</ul>
</nav>
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: 'var(--theme-deafult)',
cancelButtonText: 'Defeat',
cancelButtonColor: 'var(--theme-deafult)',
}).then((result)=>{
if(result.value){
this.$swal({
icon: 'success',
title:'Gotcha!',
text:'Pikachu was caught!',
type:'success',
confirmButtonColor: 'var(--theme-deafult)',
});
}else{
this.$swal({
text:'Pikachu fainted! You gained 500 XP!',
confirmButtonColor: 'var(--theme-deafult)',
});
}
});
},
}
}
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 }
]
};
},
}
Installing and usage
npm i vue-draggable-next
Inside Your template tags add
<draggable class="pull-left">
<div v-for="text in one" :key="text">{{text}}</div>
</draggable>
Inside Your script tags add
import { VueDraggableNext } from 'vue-draggable-next'
export default {
components:{
draggable: VueDraggableNext,
},
data(){
return{
one: [
'Lorem ipsum dolor sit amet, consectetur',
'sed do eiusmod tempor incididunt ut labore et dolore magna.',
'Ut enim ad minim veniam, quis nostrud exercitation',
'ullamco laboris nisi ut aliquip ex ea commodo consequat.'
],
}
}
}
Installing and usage
npm i dropzone-vue
In your plugins/main.js file all the following code:
import DropZone from "dropzone-vue";
.use(DropZone)
Inside Your template tags add
<DropZone
:maxFileSize="Number(60000000)"
url="http://localhost:8080"
:uploadOnDrop="true"
:dropzoneMessageClassName="customClass">
</DropZone>
Installing and usage
npm i vue3-datepicker
Inside Your template tags add
<datepicker class="datepicker-here form-control digits" v-model="date1" :format="format" :orientation="orientation" />
Inside Your script tags add
import { ref } from 'vue';
import Datepicker from "vue3-datepicker";
export default {
components: {
Datepicker,
},
data() {
return{
date: new Date(),
date1: new Date(),
date3: new Date(),
format: 'MM/dd/yyyy',
format2: 'MMMM yyyy',orientation: "top right",
disabledDates:{
days: [6, 0],
},
}
}
}
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;
},
},
}
# | First Name | Last Name | Username | Role | Country |
---|---|---|---|---|---|
1 | Alexander | Orton | @mdorton | Admin | USA |
2 | John Deo | Deo | @johndeo | User | USA |
3 | Randy Orton | the Bird | admin | UK | |
4 | Randy Mark | Ottandy | @mdothe | user | AUS |
5 | Ram Jacob | Thornton | admin | IND |
Inside Your template tags add
<div class="table-responsive">
<table class="table">
<thead>
<tr>
<th scope="col">#</th>
<th scope="col">First Name</th>
<th scope="col">Last Name</th>
<th scope="col">Username</th>
<th scope="col">Role</th>
<th scope="col">Country</th>
</tr>
</thead>
<tbody>
<tr>
<th scope="row">1</th>
<td>Alexander</td>
<td>Orton</td>
<td>@mdorton</td>
<td>Admin</td>
<td>USA</td>
</tr>
<tr>
<th scope="row">2</th>
<td>John Deo</td>
<td>Deo</td>
<td>@johndeo</td>
<td>User</td>
<td>USA</td>
</tr>
<tr>
<th scope="row">3</th>
<td>Randy Orton</td>
<td>the Bird</td>
<td>@twitter</td>
<td>admin</td>
<td>UK</td>
</tr>
<tr>
<th scope="row">4</th>
<td>Randy Mark</td>
<td>Ottandy</td>
<td>@mdothe</td>
<td>user</td>
<td>AUS</td>
</tr>
<tr>
<th scope="row">5</th>
<td>Ram Jacob</td>
<td>Thornton</td>
<td>@twitter</td>
<td>admin</td>
<td>IND</td>
</tr>
</tbody>
</table>
</div>
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') || '#24695c';
var secondary = localStorage.getItem('secondary_color') || '#ba895d';
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') || '#24695c';
var secondary = localStorage.getItem('secondary_color') || '#ba895d';
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, '#222222'],
height: 400,
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.
'
};
}
}