v-badge
component superscripts or subscripts an avatar-like icon or text onto content to highlight information to a user or to just draw attention to a specific element. Content within the badge usually contains numbers or icons. See documentation. <v-toolbar>
<v-tabs
dark
background-color="primary"
grow
>
<v-tab>
<v-badge
color="pink"
dot
>
Item One
</v-badge>
</v-tab>
<v-tab>
<v-badge
color="green"
content="6"
>
Item Two
</v-badge>
</v-tab>
<v-tab>
<v-badge
color="deep-purple accent-4"
icon="mdi-vuetify"
>
Item Three
</v-badge>
</v-tab>
</v-tabs>
</v-toolbar>
Badges help convey information to the user in a variety of ways.
You can incorporate badges with dynamic content to make things such as a notification system.
You can do many things with visibility control, for example, show badge on hover.
<v-container>
<v-row
align="center"
justify="center"
>
<v-badge
bordered
color="error"
icon="mdi-lock"
overlap
>
<v-btn
class="white--text"
color="error"
depressed
>
Lock Account
</v-btn>
</v-badge>
<div class="mx-3"></div>
<v-badge
bordered
bottom
color="deep-purple accent-4"
dot
offset-x="10"
offset-y="10"
>
<v-avatar size="40">
<v-img src="/media/users/300_2.jpg"></v-img>
</v-avatar>
</v-badge>
<div class="mx-3"></div>
<v-badge
avatar
bordered
overlap
>
<template v-slot:badge>
<v-avatar>
<v-img src="/media/project-logos/7.png"></v-img>
</v-avatar>
</template>
<v-avatar size="40">
<v-img src="/media/users/100_3.jpg"></v-img>
</v-avatar>
</v-badge>
</v-row>
</v-container>
The v-badge
component is flexible and can be used in a variety of use-cases over numerous elements. Options to tweak the location are also available through the offset-x and offset-y props.