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/useBootstrap.client.ts file all the following code:
import bootstrap from 'bootstrap/dist/js/bootstrap.bundle'
export default definenuxtplugin(nuxtapp => {
nuxtapp.provide('bootstrap', bootstrap)
})
Inside Your template tags add
<button class="btn " :class="item.classes" v-for="(item, index) in data" :key="index" type="button">{{
item.title }}</button>
Inside Your script tags add
import { useCommenStore } from "@/store/commen"
const store = useCommenStore()
const data = store.data
Inside Your store tags add
interface drop {
classes: string,
title: string
}
import model from "@/data/button.json"
export const useCommenStore = defineStore('commen', () => {
const data = ref(model.button)
return {
data,
}
})
Inside Your json tags add
{
"button": [
{
"classes": "btn-primary",
"title": "Primary Button"
},
{
"classes": "btn-secondary",
"title": "Secondary Button"
},
{
"classes": "btn-success",
"title": "Success Button"
},
{
"classes": "btn-info",
"title": "Info Button"
},
{
"classes": "btn-warning",
"title": "Warning Button"
},
{
"classes": "btn-danger",
"title": "Danger Button"
},
{
"classes": "btn-light",
"title": "Light 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">
<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 secondary alert—check it out!</p>
</div>
<div class="alert alert-success" role="alert">
<p >This is a success alert—check it out!</p>
</div>
<div class="alert alert-info" role="alert">
<p >This is a info alert—check it out!</p>
</div>
<div class="alert alert-warning" role="alert">
<p >This is a warning alert—check it out!</p>
</div>
<div class="alert alert-danger" role="alert">
<p >This is a danger alert—check it out!</p>
</div>
<div class="alert alert-light" role="alert">
<p >This is a light alert—check it out!</p>
</div>
<div class="alert alert-dark" role="alert">
<p >This is a light alert—check it out!</p>
</div>
Installing and usage
npm install vue3-popper
In your plugins/plugins.ts file all the following code:
import { defineNuxtPlugin } from '#app'
import Popper from "vue3-popper";
export default defineNuxtPlugin(nuxtApp => {
if (process.server) {
}else if (process.client) {
nuxtApp.vueApp.component('Popper', Popper)
}
})
Inside Your template tags add
<Popper placement="right" arrow>
<button class="btn btn-primary example-popover"> Click to toggle popover</button>
<template #content>
<div class="popover bs-popover-auto">
<h3 class="popover-header">Popover title</h3>
<div class="popover-body">And here's some amazing content. It's very engaging. Right?</div>
</div>
</template>
</Popper>
<Popper arrow placement="right">
<Button class="btn btn-primary example-popover">Dismissible popover</Button>
<template #content>
<div class="popover bs-popover-auto">
<h3 class="popover-header">Popover title</h3>
<div class="popover-body">And here's some amazing content. It's very engaging. Right?</div>
</div>
</template>
</Popper>
<Popper arrow hover placement="bottom">
<Button class="btn btn-primary example-popover">On Hover Tooltip</Button>
<template #content>
<div class="popover bs-popover-auto">
<h3 class="popover-header">Popover title</h3>
<div class="popover-body">Vivamus sagittis lacus vel augue laoreet rutrum faucibus.</div>
</div>
</template>
</Popper>
Installing and usage
npm install --save v-tooltip
npm i floating-vue
In your nuxt.config.ts file all the following code:
export default defineNuxtConfig({
modules: [
'floating-vue/nuxt'
]
})
Inside Your template tags add
<button class="example-popover btn btn-primary" v-tooltip="'Popover title'">Hover Me</button>
<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"><a class="nav-link active" id="home-tab" data-bs-toggle="tab" href="#home" role="tab" aria-controls="home" aria-selected="true">Home</a></li>
<li class="nav-item dropdown"><a class="nav-link dropdown-toggle bg-transparent border-none" data-bs-toggle="dropdown" href="#" role="button" aria-haspopup="true" aria-expanded="false" @click="open()">Dropdown</a>
<div class="dropdown-menu" :class="filter ? 'show' : ''"><a class="dropdown-item" id="profile-tab" data-bs-toggle="tab" href="#profile" role="tab" aria-controls="profile" aria-selected="false">Action</a><a class="dropdown-item" href="#">Another action</a><a class="dropdown-item" href="#">Something else here</a><a class="dropdown-item" href="#">Separated link</a></div>
</li>
<li class="nav-item"><a class="nav-link" id="profile-tabs" data-bs-toggle="tab" href="#profile" role="tab" aria-controls="profile" aria-selected="false">Profile</a></li>
<li class="nav-item"><a class="nav-link" id="contact-tab" data-bs-toggle="tab" href="#contact" role="tab" aria-controls="contact" aria-selected="false">Contact</a></li>
</ul>
<div class="tab-content" id="myTabContent">
<div class="tab-pane fade show active" id="home" role="tabpanel" aria-labelledby="home-tab">
<p class="mb-0 m-t-30">{{desc}}</p>
</div>
<div class="tab-pane fade" id="profile" role="tabpanel" aria-labelledby="profile-tab">
<p class="mb-0 m-t-30">{{desc}}</p>
</div>
<div class="tab-pane fade" id="contact" role="tabpanel" aria-labelledby="contact-tab">
<p class="mb-0 m-t-30">{{desc}}</p>
</div>
</div>
Inside Your script tags add
import { ref } from 'vue';
const filter = ref(false)
const desc = ref <string >("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")
function open() {
filter.value = !filter.value
}
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 ps-0" 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="headingTwo">
<h5 class="mb-0">
<button class="btn btn-link ps-0 collapsed" data-bs-toggle="collapse" data-bs-target="#collapseTwo" aria-expanded="false" aria-controls="collapseTwo">Collapsible Group Item #<span>2</span></button>
</h5>
</div>
<div class="collapse" id="collapseTwo" aria-labelledby="headingTwo" data-bs-parent="#accordion">
<div class="card-body">{{desc}}</div>
</div>
</div>
<div class="card">
<div class="card-header" id="headingThree">
<h5 class="mb-0">
<button class="btn btn-link ps-0 collapsed" data-bs-toggle="collapse" data-bs-target="#collapseThree" aria-expanded="false" aria-controls="collapseThree">Collapsible Group Item #<span>3</span></button>
</h5>
</div>
<div class="collapse" id="collapseThree" aria-labelledby="headingThree" data-bs-parent="#accordion">
<div class="card-body">{{desc}}</div>
</div>
</div>
</div>
Inside Your script tags add
import { ref } from 'vue';
const desc = ref<string>("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.")
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 usage
npm i vue3-perfect-scrollbar
In your plugins/plugins.ts file all the following code:
import { defineNuxtPlugin } from '#app'
import PerfectScrollbar from 'vue3-perfect-scrollbar'
import 'vue3-perfect-scrollbar/dist/vue3-perfect-scrollbar.css'
export default defineNuxtPlugin(nuxtApp => {
if (process.server) {
}else if (process.client) {
nuxtApp.vueApp.use(PerfectScrollbar)
}
})
Inside Your template tags add
<perfect-scrollbar class="scrollbar-margins large-margin scroll-demo p-0" :settings="settings3">
<img :src="getImgUrl('banner/1.jpg')" alt="girl" width="800" height="600" >
</perfect-scrollbar>
Inside Your script tags add
import { getImgUrl } from "@/composables/commen/imgMixin"
import { ref } from "vue"
const settings3 = ref({
maxScrollbarLength: 60
})
In your composables imgMixin.ts file all the following code:
export function getImgUrl(path: string) {
return '/images/' + path
}
Installing and usage
npm i @meforma/vue-toaster
Inside Your template tags add
<button class="btn btn-success " type="button" @click="success" variant="success" >Success</button>
Inside Your script tags add
import { createToaster } from "@meforma/vue-toaster";
const toaster = createToaster({})
function success() {
toaster.show(' New order has been placed ', { theme: 'outline', position: 'top-right', type: 'success', duration: 2000 });
}
Installing and usage
npm i @globalhive/vuejs-tour
In your plugins/plugins.ts file all the following code:
import { defineNuxtPlugin } from '#app'
import VueJsTour from '@globalhive/vuejs-tour';
import '@globalhive/vuejs-tour/dist/style.css';
export default defineNuxtPlugin(nuxtApp => {
if (process.server) {
}else if (process.client) {
nuxtApp.vueApp.use(VueJsTour)
}
})
Inside Your template tags add
<class="img-fluid" id="profile-tour" alt=""
:src="getImages('user/7.jpg')" data-intro="This is Profile image">
<router-link class="icon-wrapper" id="update-profile-tour" to="/users/edit">
<i class="icofont icofont-pencil-alt-5" data-intro="Change Profile image here" id="update-profile-tour" ></i>
</router-link>
<VTour ref="tour" :steps="steps" autoStart/>
Inside Your script tags add
import { ref, onMounted } from "vue"
const tour = ref()
const steps = ref([
{
target: "#profile-tour",
content: "This is Profile image",
},
{
target: "#update-profile-tour",
content: "Change Profile image here",
},
])
onMounted(() => {
tour.value.resetTour();
})
In your composables imgMixin.ts file all the following code:
export function getImgUrl(path: string) {
return '/images/' + path
}
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
},
}
Inside Your template tags add
<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 vue3-tree
Inside Your template tags add
<Tree :nodes="menu" :use-icon="true" />
Inside Your script tags add
import Tree from "vue3-tree";
import "vue3-tree/dist/style.css";
import { menu } from "@/composables/commen/treeView"
In your composables treeView.ts file all the following code:
import { ref } from "vue"
export const menu = ref([
{
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
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
import { ref } from "vue"
import { notify } from "@kyvg/vue3-notification";
const enternotify = ref<string>("top left")
const entericon = ref<string>("none")
interface notifys {
position: string, icon: string
}
const notifyList = ref<notifys[]>([
{ icon: "none", position: "" },
{ 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" },
])
function showNotify() {
notify({
title: "New Order has been placed",
});
}
Installing and usage
npm i sweetalert2
Inside Your template tags add
<button class="btn btn-danger sweet-5" type="button" v-on:click="basic_warning_alert" >Warning alert</button>
Inside Your script tags add
import Swal from 'sweetalert2'
function basic_warning_alert() {
Swal.fire({
icon: 'warning',
title: "Are you sure?",
text: 'Once deleted, you will not be able to recover this imaginary file!',
showCancelButton: true,
confirmButtonText: 'Ok',
confirmButtonColor: 'var(--theme-default)',
cancelButtonText: 'Cancel',
cancelButtonColor: '#efefef',
}).then((result) => {
if (result.value) {
Swal.fire({
icon: 'success',
text: 'Poof! Your imaginary file has been deleted!',
confirmButtonColor: 'var(--theme-default)',
});
} else {
Swal.fire({
text: 'Your imaginary file is safe!',
confirmButtonColor: 'var(--theme-default)',
});
}
});
}
Installing and usage
npm i vue-slider-component
Inside Your template tags add
<VueSlider v-model="one.value" :data="one.data" :tooltip="'always'" :tooltip-placement="'top'" ></VueSlider>
In your plugins/plugins.ts file all the following code:
import { defineNuxtPlugin } from '#app'
import VueSlider from 'vue-slider-component'
import 'vue-slider-component/theme/antd.css'
export default defineNuxtPlugin(nuxtApp => {
if (process.server) {
}else if (process.client) {
nuxtApp.vueApp.component("VueSlider", VueSlider)
}
})
Inside Your script tags add
import { ref } from "vue"
const one = ref({
value: 10,
data: [10, 100]
})
Installing and usage
npm i vue-cropperjs
In your plugins/plugins.ts file all the following code:
import { defineNuxtPlugin } from '#app'
import VueCropper from 'vue-cropperjs';
import 'cropperjs/dist/cropper.css';
export default defineNuxtPlugin(nuxtApp => {
if (process.server) {
}else if (process.client) {
nuxtApp.vueApp.component("VueCropper", VueCropper)
}
})
Inside Your template tags add
<vue-cropper
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(myimgSrc)"
alt="Source Image"
:ready="ready"
:crop="cropImage"
img-preview=".img-preview"
:img-style="{ width: '800px', height: '500px' }">
</vue-cropper>
Inside Your script tags add
import { getImgUrl } from "@/composables/commen/imgMixin"
import { ref, onMounted } from "vue"
const myimgSrc = ref<string>('other-images/img-cropper.jpg')
const imageData = ref<any>({})
const containerData = ref<string>('')
const putData = ref<string>('')
const viewmodeselected = ref<number>(0)
const cropImg = ref<string>('')
const aspectRatioselected = ref<number>(1.7777777777777777)
const cropper = ref()
const convertNumber = (num?: number) => num != null ? Math.round(num) : undefined
function ready() {
containerData.value = cropper.value.getContainerData();
}
function cropImage() {
imageData.value = cropper.value.getData();
cropImg.value = cropper.value.getCroppedCanvas().toDataURL();
}
onMounted(() => {
imageData.value = cropper.value.getData();
})
Installing and usage
npm i dropzone-vue
In your plugins/ plugins.ts file all the following code:
import { defineNuxtPlugin } from '#app'
import DropZone from "dropzone-vue";
export default defineNuxtPlugin(nuxtApp => {
if (process.server) {
nuxtApp.vueApp.use(DropZone)
}else if (process.client) {
}
})
Inside Your template tags add
<DropZone
:maxFileSize="Number(60000000)"
url="http://localhost:3000"
:uploadOnDrop="true"
:dropzoneMessageClassName="customClass">
</DropZone>
Installing and usage
npm i vue3-datepicker
In your plugins/ plugins.ts file all the following code:
import { defineNuxtPlugin } from '#app'
import Datepicker from '@vuepic/vue-datepicker';
import "@vuepic/vue-datepicker/dist/main.css";
export default defineNuxtPlugin(nuxtApp => {
if (process.server) {
}else if (process.client) {
nuxtApp.vueApp.component('Datepicker', Datepicker)
}
})
Inside Your template tags add
<datepicker class="datepicker-here digits" v-model="date" :format="format" />
Inside Your script tags add
import { ref } from 'vue';
const date = ref();
const format = (date: any) => {
const day = date.getDate();
const month = date.getMonth() + 1;
const year = date.getFullYear();
return ` ${day}/${month}/${year}`;
}
Installing and usage
npm i vue3-simple-typeahead
In your plugins/ plugins.ts file all the following code:
import { defineNuxtPlugin } from '#app'
import SimpleTypeahead from 'vue3-simple-typeahead';
import 'vue3-simple-typeahead/dist/vue3-simple-typeahead.css';
export default defineNuxtPlugin(nuxtApp => {
if (process.server) {
}else if (process.client) {
nuxtApp.vueApp.use(SimpleTypeahead)
}
})
Inside Your template tags add
<vue3-simple-typeahead :items="list" class="form-control typeahead form-control"
:placeholder="options.placeholder" @onInput="onInput" @onBlur="onBlur"
:minInputLength="options.minInputLength" />
Inside Your script tags add
import { options, list, onInput, onBlur } from "@/composables/commen/typeaheadview"
In your composables typeaheadview.ts file all the following code:
import { ref, onMounted } from "vue";
onMounted(() => {
listFiltered.value = list.value;
})
interface data {
placeholder: string,
minInputLength: number,
hint: boolean
}
export const options = ref({
placeholder: 'States of USA',
minInputLength: 1,
hint: false
})
export const listFiltered = ref([])
export const list = ref(['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',
'south carolina',
'south dakota',
'tennessee',
'texas',
'utah',
'vermont',
'virginia',
'washington',
'west virginia',
'wisconsin',
'wyoming',
])
export function selectItem(item: any) {
}
export function onInput(event: any) {
listFiltered.value = event.items;
}
export function onBlur(event: any) {
listFiltered.value = event.items;
}
Id | First Name | Last Name | Username | Designation | Company | Language | Country |
---|---|---|---|---|---|---|---|
1 | ![]() |
Wolfe | RamJacob@twitter | Developer | Apple Inc. | Php | IND |
2 | ![]() |
Gummer | JohnDeo@twitter | Designer | Hewlett packard | Html | US |
3 | ![]() |
Cazale | ElanaJohn@twitter | Designer | Microsoft | Pug | UK |
4 | ![]() |
Roberts | MerylStreep@twitter | Developer | Tata Ltd. | React | IDN |
5 | ![]() |
Stone | EmmaStone@twitter | Developer | Wipro Ltd. | Vue | IRN |
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-circle">{{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 { useBootstrapStore } from "@/store/bootstrap"
import { getImgUrl } from "@/composables/commen/imgMixin"
const store = useBootstrapStore()
const bootstraplist = store.data
In your composables imgMixin.ts file all the following code:
export function getImgUrl(path: string) {
return '/images/' + path
}
Inside Your json tags add
{
"datatable1": [
{
"id": 1,
"img": "user/1.jpg",
"firstName": "Ram Jacob",
"lastName": "Wolfe",
"userName": "RamJacob@twitter",
"role": "Developer",
"company": "Apple Inc.",
"language": "Php",
"badgeClass": "badge-light-danger",
"credit": "$3500.00",
"borderColor": "border-bottom-secondary",
"country": "IND"
},
{
"id": 2,
"img": "user/2.png",
"firstName": "John Deo",
"lastName": "Gummer",
"userName": "JohnDeo@twitter",
"role": "Designer",
"company": "Hewlett packard",
"language": "Html",
"badgeClass": "badge-light-primary",
"credit": "$2400.00",
"borderColor": "border-bottom-success",
"country": "US"
},
{
"id": 3,
"img": "user/3.jpg",
"firstName": "Elana John",
"lastName": "Cazale",
"userName": "ElanaJohn@twitter",
"role": "Designer",
"company": "Microsoft",
"language": "Pug",
"badgeClass": "badge-light-danger",
"credit": "$2560.00",
"borderColor": "border-bottom-info",
"country": "UK"
},
{
"id": 4,
"img": "user/3.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": "user/6.jpg",
"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": "user/7.jpg",
"firstName": "Eliana Jons",
"lastName": "Jons",
"userName": "ElianaJons@twitter",
"role": "Developer",
"company": "Info Ltd.",
"badgeClass": "badge-light-success",
"language": "Vue",
"credit": "$4580.00",
"borderColor": "border-bottom-light",
"country": "IRN"
}
]
}
Inside Your pinia store ts tags add
import { defineStore } from 'pinia'
interface table {
id: number,
img: string,
firstName: string,
lastName: string,
userName: string,
role: string,
company: string,
language: string,
badgeClass: string,
credit: string,
borderColor: string,
country: string
}
import bootstrap from "@/data/bootstrap.json"
export const useBootstrapStore = defineStore('bootstrap', () => {
const data: table[] = (JSON.parse(JSON.stringify(bootstrap.datatable1)))
return {
data,
}
})
Installing and usage
npm i vue3-apexcharts
In your plugins/plugins.ts file all the following code:
import { defineNuxtPlugin } from '#app'
import VueApexCharts from "vue3-apexcharts";
export default defineNuxtPlugin(nuxtApp => {
if (process.server) {
}else if (process.client) {
nuxtApp.vueApp.component('VueApexCharts', VueApexCharts)
}
})
Inside Your template tags add
<ClientOnly>
<VueApexCharts type="area" height="350" ref="chart" :options="chartOptions" :series="series">
</VueApexCharts>
</ClientOnly>
Inside Your script tags add
import chart from "@/data/chart.json"
let primary = ref('#24695c')
primary.value = useCookie('primary_color').value ? useCookie('primary_color').value : '#24695c'
const series = [
{
name: "STOCK ABC",
data: chart.monthDataSeries1.prices,
},
]
const chartOptions = {
chart: {
height: 350,
type: "area",
zoom: {
enabled: false,
},
toolbar: {
show: false,
},
},
dataLabels: {
enabled: false,
},
stroke: {
curve: "straight",
},
title: {
text: "Fundamental Analysis of Stocks",
align: "left",
},
subtitle: {
text: "Price Movements",
align: "left",
},
labels: chart.monthDataSeries1.dates,
xaxis: {
type: "datetime",
},
yaxis: {
opposite: true,
},
legend: {
horizontalAlign: "left",
},
colors: [primary.value],
}
Inside Your json tags add
{
"monthDataSeries1": {
"prices": [
8107.85,
8128.0,
8122.9,
8165.5,
8340.7,
8423.7,
8423.5,
8514.3,
8481.85,
8487.7,
8506.9,
8626.2,
8668.95,
8602.3,
8607.55,
8512.9,
8496.25,
8600.65,
8881.1,
9340.85
],
"dates": [
"13 Nov 2017",
"14 Nov 2017",
"15 Nov 2017",
"16 Nov 2017",
"17 Nov 2017",
"20 Nov 2017",
"21 Nov 2017",
"22 Nov 2017",
"23 Nov 2017",
"24 Nov 2017",
"27 Nov 2017",
"28 Nov 2017",
"29 Nov 2017",
"30 Nov 2017",
"01 Dec 2017",
"04 Dec 2017",
"05 Dec 2017",
"06 Dec 2017",
"07 Dec 2017",
"08 Dec 2017"
]
}
}
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
import { GChart } from "vue-google-charts";
let primary = ref('#24695c')
let secondary = ref("#ba895d");
primary.value = useCookie('primary_color').value ? useCookie('primary_color').value : '#24695c'
secondary.value = useCookie('secondary_color').value ? useCookie('secondary_color').value : '#ba895d'
const 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.value, secondary.value, "#51bb25"],
height: 500,
width: '100%',
},
}
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" global-leaflet="false" :center="simple.center" :useGlobalLeaflet="false"
style="height: 500px">
<l-tile-layer :url="simple.url"><l-tile-layer>
<l-map>
Inside Your script tags add
import { LMap, LTileLayer } from "@vue-leaflet/vue-leaflet";
const simple =ref( {
zoom: 5,
center: [49.439557, 234.558105],
url: 'http://{s}.tile.osm.org/{z}/{x}/{y}.png',
})
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';
import { ref } from "vue"
const ckeditor = CKEditor.component
const editor = ClassicEditor
const editorData = ref<string>('<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>')