@@ -4,6 +4,62 @@ A simple plugin to create scrollable tabs with Bootstrap 5.
4
4
5
5
[ ![ preview] [ 1 ]] [ 1 ]
6
6
7
+ ## Usage:
8
+
9
+ ### Required libraries:
10
+
11
+ ``` html
12
+ <!-- Bootstrap icons-->
13
+ <link rel =" stylesheet" href =" https://cdnjs.cloudflare.com/ajax/libs/bootstrap-icons/1.7.2/font/bootstrap-icons.min.css" >
14
+
15
+ <!-- External library-->
16
+ <script src =" move.min.js" ></script >
17
+ <!-- https://visionmedia.github.io/move.js/-->
18
+
19
+ <!-- Scrollable libs-->
20
+ <link href =" scrollable-tabs.css" rel =" stylesheet" >
21
+ <script src =" scrollable-tabs.js" ></script >
22
+ ```
23
+
24
+ ### HTML example:
25
+
26
+ ``` html
27
+ <div class =" w-100" >
28
+ <div class =" scroller scroller-left float-start mt-2" ><i class =" bi bi-caret-left-fill" ></i ></div >
29
+ <div class =" scroller scroller-right float-end mt-2" ><i class =" bi bi-caret-right-fill" ></i ></div >
30
+ <div class =" wrapper-nav" >
31
+ <nav class =" nav nav-tabs list mt-2" id =" myTab" role =" tablist" >
32
+ <a class =" nav-item nav-link pointer active" data-bs-toggle =" tab" data-bs-target =" #tab1" role =" tab" aria-controls =" public" aria-selected =" true" >Tab1</a >
33
+ <a class =" nav-item nav-link pointer" data-bs-target =" #tab2" role =" tab" data-bs-toggle =" tab" >Tab 2</a >
34
+ <a class =" nav-item nav-link pointer" data-bs-target =" #tab3" role =" tab" data-bs-toggle =" tab" >Tab 3</a >
35
+ <a class =" nav-item nav-link pointer" data-bs-target =" #tab4" role =" tab" data-bs-toggle =" tab" >Tab 4</a >
36
+ <a class =" nav-item nav-link pointer" data-bs-target =" #tab5" role =" tab" data-bs-toggle =" tab" >Tab 5</a >
37
+ <a class =" nav-item nav-link pointer" data-bs-target =" #tab6" role =" tab" data-bs-toggle =" tab" >Tab 6</a >
38
+ </nav >
39
+ </div >
40
+ <div class =" tab-content p-3" id =" myTabContent" >
41
+ <div role =" tabpanel" class =" tab-pane fade active show mt-2" id =" tab1" aria-labelledby =" public-tab" >
42
+ This is the content of Tab 1...
43
+ </div >
44
+ <div class =" tab-pane fade mt-2" id =" tab2" role =" tabpanel" aria-labelledby =" group-dropdown2-tab" >
45
+ This is the content of Tab 2...
46
+ </div >
47
+ <div class =" tab-pane fade mt-2" id =" tab3" role =" tabpanel" aria-labelledby =" group-dropdown2-tab" >
48
+ This is the content of Tab 3...
49
+ </div >
50
+ <div class =" tab-pane fade mt-2" id =" tab4" role =" tabpanel" aria-labelledby =" group-dropdown2-tab" >
51
+ This is the content of Tab 4...
52
+ </div >
53
+ <div class =" tab-pane fade mt-2" id =" tab5" role =" tabpanel" aria-labelledby =" group-dropdown2-tab" >
54
+ This is the content of Tab 5...
55
+ </div >
56
+ <div class =" tab-pane fade mt-2" id =" tab6" role =" tabpanel" aria-labelledby =" group-dropdown2-tab" >
57
+ This is the content of Tab 6...
58
+ </div >
59
+ </div >
60
+ </div >
61
+ ```
62
+
7
63
** Based on:**
8
64
9
65
https://www.codeply.com/go/Loo3CqsA7T
0 commit comments