badge.vue
3.39 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
<script setup>
import * as demoCode from '@/views/demos/components/badge/demoCodeBadge'
</script>
<template>
<VRow class="match-height">
<VCol
cols="12"
md="6"
>
<!-- 👉 Style -->
<AppCardCode
title="Style"
:code="demoCode.style"
>
<p>You can use various props like <code>bordered</code>, <code>dot</code>, <code>inline</code>, <code>rounded</code> etc. to style the badge.</p>
<DemoBadgeStyle />
</AppCardCode>
</VCol>
<VCol
cols="12"
md="6"
>
<!-- 👉 Color -->
<AppCardCode
title="Color"
:code="demoCode.color"
>
<p>Use <code>color</code> prop to create various background badges.</p>
<DemoBadgeColor />
</AppCardCode>
</VCol>
<VCol
cols="12"
md="6"
>
<!-- 👉 Position -->
<AppCardCode
title="Position"
:code="demoCode.position"
>
<p>You can use <code>location</code> prop to change the position of the badge. Possible values are <code>top-end</code>, <code>bottom-end</code>, <code>bottom-start</code>, <code>top-start</code>.</p>
<DemoBadgePosition />
</AppCardCode>
</VCol>
<VCol
cols="12"
md="6"
>
<!-- 👉 Icon -->
<AppCardCode
title="Icon"
:code="demoCode.icon"
>
<p>You can use <code>icon</code> prop or use <code>slot</code> to render the icon</p>
<DemoBadgeIcon />
</AppCardCode>
</VCol>
<VCol
cols="12"
md="6"
>
<!-- 👉 Avatar Status -->
<AppCardCode
title="Avatar Status"
:code="demoCode.avatarStatus"
>
<p>You can use badge with avatar as status.</p>
<DemoBadgeAvatarStatus />
</AppCardCode>
</VCol>
<VCol
cols="12"
md="6"
>
<!-- 👉 Dynamic notifications -->
<AppCardCode
title="Dynamic notifications"
:code="demoCode.dynamicNotifications"
>
<p>You can incorporate badges with dynamic content to make things such as a notification system.</p>
<DemoBadgeDynamicNotifications />
</AppCardCode>
</VCol>
<VCol
cols="12"
md="6"
>
<!-- 👉 Show on hover -->
<AppCardCode
title="Show on hover"
:code="demoCode.showOnHover"
>
<p>You can do many things with visibility control, for example, show badge on hover.</p>
<DemoBadgeShowOnHover />
</AppCardCode>
</VCol>
<VCol
cols="12"
md="6"
>
<!-- 👉 Tabs -->
<AppCardCode
title="Tabs"
:code="demoCode.tabs"
>
<p>Badges help convey information to the user in a variety of ways.</p>
<DemoBadgeTabs />
</AppCardCode>
</VCol>
<VCol
cols="12"
md="6"
>
<!-- 👉 Maximum value content -->
<AppCardCode
title="Maximum Value"
:code="demoCode.maximumValue"
>
<p>Use <code>max</code> prop to cap the value of the badge content</p>
<DemoBadgeMaximumValue />
</AppCardCode>
</VCol>
<VCol
cols="12"
md="6"
>
<AppCardCode
title="Tonal"
:code="demoCode.tonal"
>
<p>Use class <code>v-badge--tonal</code> for using tonal variant badge.</p>
<DemoBadgeTonal />
</AppCardCode>
</VCol>
</VRow>
</template>