tabs.vue
4 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
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
<script setup>
import * as demoCode from '@/views/demos/components/tabs/demoCodeTabs'
</script>
<template>
<VRow class="match-height">
<VCol
cols="12"
md="6"
>
<!-- 👉 Basic -->
<AppCardCode
title="Basic"
:code="demoCode.basic"
>
<p>The <code>v-tabs</code> component is used for hiding content behind a selectable item.</p>
<DemoTabsBasic />
</AppCardCode>
</VCol>
<VCol
cols="12"
md="6"
>
<!-- 👉 Basic Pill -->
<AppCardCode
title="Basic Pill"
:code="demoCode.basicPill"
>
<p>Use our custom class <code>.v-tabs-pill</code> along with <code>v-tabs</code> component to style pill tabs.</p>
<DemoTabsBasicPill />
</AppCardCode>
</VCol>
<VCol
cols="12"
md="6"
>
<!-- 👉 Stacked -->
<AppCardCode
title="Stacked"
:code="demoCode.stacked"
>
<p>Using <code>stacked</code> prop you can have buttons that use both icons and text.</p>
<DemoTabsStacked />
</AppCardCode>
</VCol>
<VCol
cols="12"
md="6"
>
<!-- 👉 Vertical -->
<AppCardCode
title="Vertical"
:code="demoCode.vertical"
>
<p>The <code>vertical</code> prop allows for <code>v-tab</code> components to stack vertically.</p>
<DemoTabsVertical />
</AppCardCode>
</VCol>
<VCol
cols="12"
md="6"
>
<!-- 👉 Vertical Pill -->
<AppCardCode
title="Vertical Pill"
:code="demoCode.verticalPill"
>
<p>Use our custom class .v-tabs-pill along with v-tabs component to style pill tabs.</p>
<DemoTabsVerticalPill />
</AppCardCode>
</VCol>
<VCol
cols="12"
md="6"
>
<!-- 👉 Alignment -->
<AppCardCode
title="Alignment"
:code="demoCode.alignment"
>
<p>Use <code>align-tabs</code> prop to change the tabs alignment.</p>
<DemoTabsAlignment />
</AppCardCode>
</VCol>
<VCol
cols="12"
md="6"
>
<!-- 👉 Pagination -->
<AppCardCode
title="Pagination"
:code="demoCode.pagination"
>
<p>If the tab items overflow their container, pagination controls will appear on desktop.</p>
<DemoTabsPagination />
</AppCardCode>
</VCol>
<VCol
cols="12"
md="6"
>
<!-- 👉 Custom Icons -->
<AppCardCode
title="Custom Icons"
:code="demoCode.customIcons"
>
<p><code>prev-icon</code> and <code>next-icon</code> props can be used for applying custom pagination icons.</p>
<DemoTabsCustomIcons />
</AppCardCode>
</VCol>
<VCol cols="12">
<!-- 👉 Fixed tabs -->
<AppCardCode
title="Fixed"
:code="demoCode.fixed"
>
<p>The <code>fixed-tabs</code> prop forces <code>v-tab</code> to take up all available space up to the maximum width (300px).</p>
<DemoTabsFixed />
</AppCardCode>
</VCol>
<VCol cols="12">
<!-- 👉 Grow -->
<AppCardCode
title="Grow"
:code="demoCode.grow"
>
<p>The <code>grow</code> prop will make the tab items take up all available space with no limit.</p>
<DemoTabsGrow />
</AppCardCode>
</VCol>
<VCol
cols="12"
md="6"
>
<!-- 👉 Programmatic Navigation -->
<AppCardCode
title="Programmatic Navigation"
:code="demoCode.programmaticNavigation"
>
<DemoTabsProgrammaticNavigation />
</AppCardCode>
</VCol>
<VCol
cols="12"
md="6"
>
<!-- 👉 Dynamic Tabs -->
<AppCardCode
title="Dynamic"
:code="demoCode.dynamic"
>
<p>Tabs can be dynamically added and removed. This allows you to update to any number and the <code>v-tabs</code> component will react.</p>
<DemoTabsDynamic />
</AppCardCode>
</VCol>
</VRow>
</template>